Sellerjoinin.php 6.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
  9. * 网站地址: https://www.valimart.net/
  10. * ----------------------------------------------------------------------------
  11. *
  12. * ============================================================================
  13. * 验证器
  14. */
  15. class Sellerjoinin extends Validate
  16. {
  17. protected $rule = [
  18. 'company_name'=>'require|length:1,50',
  19. // 'company_address'=>'require|length:1,50',
  20. 'company_address_detail'=>'require|length:1,50',
  21. 'company_registered_capital'=>'require|float',
  22. 'contacts_name'=>'require|length:1,20',
  23. 'contacts_phone'=>'require|length:1,20',
  24. 'contacts_email'=>'require|email',
  25. 'business_licence_number'=>'require|length:1,20',
  26. // 'business_licence_address'=>'require|length:1,50',
  27. 'business_licence_start'=>'require',
  28. 'bank_account_name'=>'require|length:1,50',
  29. 'bank_account_number'=>'require|length:1,30',
  30. 'bank_name'=>'require|length:1,50',
  31. // 'bank_address'=>'require',
  32. 'settlement_bank_account_name'=>'require|length:1,50',
  33. 'settlement_bank_account_number'=>'require|length:1,50',
  34. 'settlement_bank_name'=>'require|length:1,50',
  35. 'seller_name'=>'require',
  36. 'store_name'=>'require|length:1,50',
  37. 'storegrade_id'=>'require',
  38. 'storeclass_id'=>'require',
  39. //sellerjoininc2c
  40. 'business_sphere'=>'require|length:1,20',
  41. 'business_licence_number_electronic'=>'require'
  42. ];
  43. protected $message = [
  44. 'company_name.require'=>'公司名称不能为空|公司名称必须小于50个字',
  45. 'company_name.length'=>'公司名称不能为空|公司名称必须小于50个字',
  46. // 'company_address.require|length:1,50'=>'公司地址不能为空|公司地址必须小于50个字',
  47. 'company_address_detail.require'=>'公司详细地址不能为空|公司详细地址必须小于50个字',
  48. 'company_address_detail.length'=>'公司详细地址不能为空|公司详细地址必须小于50个字',
  49. 'company_registered_capital.require'=>'注册资金不能为空|注册资金必须为数字',
  50. 'company_registered_capital.float'=>'注册资金不能为空|注册资金必须为数字',
  51. 'contacts_name.require'=>'联系人姓名不能为空|联系人姓名必须小于20个字',
  52. 'contacts_name.length'=>'联系人姓名不能为空|联系人姓名必须小于20个字',
  53. 'contacts_phone.require'=>'联系人电话不能为空|联系人电话必须小于20个字',
  54. 'contacts_phone.length'=>'联系人电话不能为空|联系人电话必须小于20个字',
  55. 'contacts_email.require'=>'电子邮箱不能为空|电子邮箱格式不正确',
  56. 'contacts_email.email'=>'电子邮箱不能为空|电子邮箱格式不正确',
  57. 'business_licence_number.require'=>'证件号码不能为空',
  58. 'business_licence_number.length'=>'证件号码必须小于20个字',
  59. // 'business_licence_address.require|length:1,50'=>'营业执照所在地不能为空|营业执照所在地必须小于50个字',
  60. 'business_licence_start.require'=>'营业执照有效期不能为空',
  61. 'bank_account_name.require'=>'银行开户名不能为空|银行开户名必须小于50个字',
  62. 'bank_account_name.length'=>'银行开户名不能为空|银行开户名必须小于50个字',
  63. 'bank_account_number.require'=>'银行账号不能为空|银行账号必须小于20个字',
  64. 'bank_account_number.length'=>'银行账号不能为空|银行账号必须小于20个字',
  65. 'bank_name.require'=>'开户银行支行不能为空|开户银行支行必须小于50个字',
  66. 'bank_name.length'=>'开户银行支行不能为空|开户银行支行必须小于50个字',
  67. // 'bank_address.require'=>'开户行所在地不能为空',
  68. 'settlement_bank_account_name.require'=>'银行开户名不能为空|银行开户名必须小于50个字',
  69. 'settlement_bank_account_name.length'=>'银行开户名不能为空|银行开户名必须小于50个字',
  70. 'settlement_bank_account_number.require'=>'银行账号不能为空|银行账号必须小于50个字',
  71. 'settlement_bank_account_number.length'=>'银行账号不能为空|银行账号必须小于50个字',
  72. 'settlement_bank_name.require'=>'开户银行支行不能为空|开户银行支行必须小于50个字',
  73. 'settlement_bank_name.length'=>'开户银行支行不能为空|开户银行支行必须小于50个字',
  74. 'seller_name.require'=>'商家账号不能为空',
  75. 'store_name.require'=>'店铺名称不能为空|店铺名称必须小于50个字',
  76. 'store_name.length'=>'店铺名称不能为空|店铺名称必须小于50个字',
  77. 'storegrade_id.require'=>'店铺等级不能为空',
  78. 'storeclass_id.require'=>'店铺分类不能为空',
  79. //sellerjoininc2c
  80. 'business_sphere.require'=>'姓名不能为空|姓名不能小于50个字',
  81. 'business_sphere.length'=>'姓名不能为空|姓名不能小于50个字',
  82. 'business_licence_number_electronic.require'=>'请上传证件照片'
  83. ];
  84. protected $scene = [
  85. 'step2_save_valid' => ['company_name','company_address_detail','company_registered_capital','contacts_name','contacts_phone','contacts_email','business_licence_number','business_licence_start','business_licence_end','business_licence_number_electronic'],
  86. 'step3_save_valid' => ['bank_account_name','bank_account_number','bank_name','settlement_bank_account_name','settlement_bank_account_number','settlement_bank_name'],
  87. 'step4_save_valid' => ['seller_name','store_name','storegrade_id','storeclass_id'],
  88. //sellerjoininc2c
  89. 'step2_save_valid2' => ['company_name','company_address_detail','contacts_name','contacts_phone','contacts_email','business_licence_number','business_licence_number_electronic'],
  90. 'step3_save_valid3' => ['settlement_bank_account_name','settlement_bank_account_number'],
  91. 'step4_save_valid4' => ['seller_name','store_name','storegrade_id','storeclass_id'],
  92. ];
  93. }