Sellerjoinin.php 6.3 KB

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