Sellerjoinin.php 6.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. * DSMall多用户商城
  7. * ============================================================================
  8. * 版权所有 2014-2028 长沙德尚网络科技有限公司,并保留所有权利。
  9. * 网站地址: http://www.csdeshang.com
  10. * ----------------------------------------------------------------------------
  11. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用 .
  12. * 不允许对程序代码以任何形式任何目的的再发布。
  13. * ============================================================================
  14. * 验证器
  15. */
  16. class Sellerjoinin extends Validate
  17. {
  18. protected $rule = [
  19. 'company_name'=>'require|length:1,50',
  20. // 'company_address'=>'require|length:1,50',
  21. 'company_address_detail'=>'require|length:1,50',
  22. 'company_registered_capital'=>'require|float',
  23. 'contacts_name'=>'require|length:1,20',
  24. 'contacts_phone'=>'require|length:1,20',
  25. 'contacts_email'=>'require|email',
  26. 'business_licence_number'=>'require|length:1,20',
  27. // 'business_licence_address'=>'require|length:1,50',
  28. 'business_licence_start'=>'require',
  29. 'bank_account_name'=>'require|length:1,50',
  30. 'bank_account_number'=>'require|length:1,30',
  31. 'bank_name'=>'require|length:1,50',
  32. // 'bank_address'=>'require',
  33. 'settlement_bank_account_name'=>'require|length:1,50',
  34. 'settlement_bank_account_number'=>'require|length:1,50',
  35. 'settlement_bank_name'=>'require|length:1,50',
  36. 'seller_name'=>'require',
  37. 'store_name'=>'require|length:1,50',
  38. 'storegrade_id'=>'require',
  39. 'storeclass_id'=>'require',
  40. //sellerjoininc2c
  41. 'business_sphere'=>'require|length:1,20',
  42. 'business_licence_number_electronic'=>'require'
  43. ];
  44. protected $message = [
  45. 'company_name.require'=>'公司名称不能为空|公司名称必须小于50个字',
  46. 'company_name.length'=>'公司名称不能为空|公司名称必须小于50个字',
  47. // 'company_address.require|length:1,50'=>'公司地址不能为空|公司地址必须小于50个字',
  48. 'company_address_detail.require'=>'公司详细地址不能为空|公司详细地址必须小于50个字',
  49. 'company_address_detail.length'=>'公司详细地址不能为空|公司详细地址必须小于50个字',
  50. 'company_registered_capital.require'=>'注册资金不能为空|注册资金必须为数字',
  51. 'company_registered_capital.float'=>'注册资金不能为空|注册资金必须为数字',
  52. 'contacts_name.require'=>'联系人姓名不能为空|联系人姓名必须小于20个字',
  53. 'contacts_name.length'=>'联系人姓名不能为空|联系人姓名必须小于20个字',
  54. 'contacts_phone.require'=>'联系人电话不能为空|联系人电话必须小于20个字',
  55. 'contacts_phone.length'=>'联系人电话不能为空|联系人电话必须小于20个字',
  56. 'contacts_email.require'=>'电子邮箱不能为空|电子邮箱格式不正确',
  57. 'contacts_email.email'=>'电子邮箱不能为空|电子邮箱格式不正确',
  58. 'business_licence_number.require'=>'证件号码不能为空',
  59. 'business_licence_number.length'=>'证件号码必须小于20个字',
  60. // 'business_licence_address.require|length:1,50'=>'营业执照所在地不能为空|营业执照所在地必须小于50个字',
  61. 'business_licence_start.require'=>'营业执照有效期不能为空',
  62. 'bank_account_name.require'=>'银行开户名不能为空|银行开户名必须小于50个字',
  63. 'bank_account_name.length'=>'银行开户名不能为空|银行开户名必须小于50个字',
  64. 'bank_account_number.require'=>'银行账号不能为空|银行账号必须小于20个字',
  65. 'bank_account_number.length'=>'银行账号不能为空|银行账号必须小于20个字',
  66. 'bank_name.require'=>'开户银行支行不能为空|开户银行支行必须小于50个字',
  67. 'bank_name.length'=>'开户银行支行不能为空|开户银行支行必须小于50个字',
  68. // 'bank_address.require'=>'开户行所在地不能为空',
  69. 'settlement_bank_account_name.require'=>'银行开户名不能为空|银行开户名必须小于50个字',
  70. 'settlement_bank_account_name.length'=>'银行开户名不能为空|银行开户名必须小于50个字',
  71. 'settlement_bank_account_number.require'=>'银行账号不能为空|银行账号必须小于50个字',
  72. 'settlement_bank_account_number.length'=>'银行账号不能为空|银行账号必须小于50个字',
  73. 'settlement_bank_name.require'=>'开户银行支行不能为空|开户银行支行必须小于50个字',
  74. 'settlement_bank_name.length'=>'开户银行支行不能为空|开户银行支行必须小于50个字',
  75. 'seller_name.require'=>'商家账号不能为空',
  76. 'store_name.require'=>'店铺名称不能为空|店铺名称必须小于50个字',
  77. 'store_name.length'=>'店铺名称不能为空|店铺名称必须小于50个字',
  78. 'storegrade_id.require'=>'店铺等级不能为空',
  79. 'storeclass_id.require'=>'店铺分类不能为空',
  80. //sellerjoininc2c
  81. 'business_sphere.require'=>'姓名不能为空|姓名不能小于50个字',
  82. 'business_sphere.length'=>'姓名不能为空|姓名不能小于50个字',
  83. 'business_licence_number_electronic.require'=>'请上传证件照片'
  84. ];
  85. protected $scene = [
  86. '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'],
  87. 'step3_save_valid' => ['bank_account_name','bank_account_number','bank_name','settlement_bank_account_name','settlement_bank_account_number','settlement_bank_name'],
  88. 'step4_save_valid' => ['seller_name','store_name','storegrade_id','storeclass_id'],
  89. //sellerjoininc2c
  90. 'step2_save_valid2' => ['company_name','company_address_detail','contacts_name','contacts_phone','contacts_email','business_licence_number','business_licence_number_electronic'],
  91. 'step3_save_valid3' => ['settlement_bank_account_name','settlement_bank_account_number'],
  92. 'step4_save_valid4' => ['seller_name','store_name','storegrade_id','storeclass_id'],
  93. ];
  94. }