Chain.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * DSO2O多用户商城
  6. *
  7. * ----------------------------------------------------------------------------
  8. *
  9. * 验证器
  10. */
  11. class Chain extends Validate
  12. {
  13. protected $rule = [
  14. 'chain_name' => 'require',
  15. 'chain_passwd' => 'require',
  16. 'chain_truename' => 'require',
  17. 'chain_idcard' => 'require',
  18. 'chain_mobile' => 'require',
  19. 'chain_addressname' => 'require',
  20. 'chain_area_3' => 'require',
  21. 'chain_area_info' => 'require',
  22. 'chain_address' => 'require',
  23. 'chain_longitude' => 'require',
  24. 'chain_latitude' => 'require',
  25. ];
  26. protected $message = [
  27. 'chain_name.require' => '账户为必填',
  28. 'chain_passwd.require' => '密码为必填',
  29. 'chain_truename.require' => '真实姓名为必填',
  30. 'chain_idcard.require' => '身份证为必填',
  31. 'chain_mobile.require' => '手机号码为必填',
  32. 'chain_addressname.require' => '服务站名称为必填',
  33. 'chain_area_3.require' => '地区必须到3级',
  34. 'chain_area_info.require' => '地区为必填',
  35. 'chain_address.require' => '详细地址为必填',
  36. 'chain_longitude.require' => '请给详细地址定位',
  37. 'chain_latitude.require' => '请给详细地址定位',
  38. ];
  39. protected $scene = [
  40. 'chain_add' => ['chain_name', 'chain_passwd', 'chain_truename', 'chain_mobile', 'chain_addressname', 'chain_area_3', 'chain_area_info', 'chain_address', 'chain_longitude', 'chain_latitude'],
  41. 'chain_edit' => ['chain_truename', 'chain_mobile', 'chain_addressname', 'chain_area_3', 'chain_area_info', 'chain_address', 'chain_longitude', 'chain_latitude'],
  42. 'chain_apply' => ['chain_name', 'chain_passwd', 'chain_truename', 'chain_idcard', 'chain_mobile', 'chain_addressname', 'chain_area_3', 'chain_area_info', 'chain_address',],
  43. 'chain_apply_again' => ['chain_name', 'chain_truename', 'chain_idcard', 'chain_mobile', 'chain_addressname', 'chain_area_3', 'chain_area_info', 'chain_address',],
  44. 'chain_setting' => ['chain_mobile', 'chain_addressname', 'chain_area_3', 'chain_area_info', 'chain_address',],
  45. ];
  46. }