StoreServiceFeedbackValidate.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\validate\api\user;
  12. use think\Validate;
  13. /**
  14. * 话术验证
  15. * Class StoreServiceFeedbackValidate
  16. * @package app\validate\api\user
  17. */
  18. class StoreServiceFeedbackValidate extends Validate
  19. {
  20. /**
  21. * @var string[]
  22. */
  23. protected $regex = ['phone' => '/^1[3456789]\d{9}$/'];
  24. /**
  25. * @var string[]
  26. */
  27. protected $rule = [
  28. 'phone' => 'require|regex:phone',
  29. 'rela_name' => 'require',
  30. 'content' => 'require',
  31. ];
  32. /**
  33. * @var string[]
  34. */
  35. protected $message = [
  36. 'phone.require' => '请输入手机号',
  37. 'phone.regex' => '手机号格式错误',
  38. 'content.require' => '请填写反馈内容',
  39. 'rela_name.require' => '请填写真实姓名',
  40. ];
  41. }