Chain.php 2.6 KB

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