Chain.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. * DSO2O多用户商城
  7. * ============================================================================
  8. * 版权所有 2014-2028 长沙德尚网络科技有限公司,并保留所有权利。
  9. * 网站地址: http://www.csdeshang.com
  10. * ----------------------------------------------------------------------------
  11. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用 .
  12. * 不允许对程序代码以任何形式任何目的的再发布。
  13. * ============================================================================
  14. * 验证器
  15. */
  16. class Chain extends Validate {
  17. protected $rule = [
  18. 'chain_name' => 'require',
  19. 'chain_passwd' => 'require',
  20. 'chain_truename' => 'require',
  21. 'chain_idcard' => 'require',
  22. 'chain_mobile' => 'require',
  23. 'chain_addressname' => 'require',
  24. 'chain_area_3' => 'require',
  25. 'chain_area_info' => 'require',
  26. 'chain_address' => 'require',
  27. 'chain_longitude' => 'require',
  28. 'chain_latitude' => 'require',
  29. ];
  30. protected $message = [
  31. 'chain_name.require' => '账户为必填',
  32. 'chain_passwd.require' => '密码为必填',
  33. 'chain_truename.require' => '真实姓名为必填',
  34. 'chain_idcard.require' => '身份证为必填',
  35. 'chain_mobile.require' => '手机号码为必填',
  36. 'chain_addressname.require' => '服务站名称为必填',
  37. 'chain_area_3.require' => '地区必须到3级',
  38. 'chain_area_info.require' => '地区为必填',
  39. 'chain_address.require' => '详细地址为必填',
  40. 'chain_longitude.require' => '请给详细地址定位',
  41. 'chain_latitude.require' => '请给详细地址定位',
  42. ];
  43. protected $scene = [
  44. 'chain_add' => ['chain_name','chain_passwd','chain_truename','chain_mobile','chain_addressname','chain_area_3','chain_area_info','chain_address','chain_longitude','chain_latitude'],
  45. 'chain_edit' => ['chain_truename','chain_mobile','chain_addressname','chain_area_3','chain_area_info','chain_address','chain_longitude','chain_latitude'],
  46. 'chain_apply' => ['chain_name','chain_passwd','chain_truename','chain_idcard','chain_mobile','chain_addressname','chain_area_3','chain_area_info','chain_address',],
  47. 'chain_apply_again' => ['chain_name','chain_truename','chain_idcard','chain_mobile','chain_addressname','chain_area_3','chain_area_info','chain_address',],
  48. 'chain_setting' => ['chain_mobile','chain_addressname','chain_area_3','chain_area_info','chain_address',],
  49. ];
  50. }