Complain.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. *
  9. * ----------------------------------------------------------------------------
  10. *
  11. * ============================================================================
  12. * 验证器
  13. */
  14. class Complain extends Validate
  15. {
  16. protected $rule = [
  17. 'final_handle_message' => 'require|max:255|min:1',
  18. 'complain_subject_content' => 'require|max:50|min:1',
  19. 'complain_subject_desc' => 'require|max:50|min:1',
  20. ];
  21. protected $message = [
  22. 'final_handle_message.require' => '处理意见不能为空',
  23. 'final_handle_message.max' => '必须小于255个字符',
  24. 'final_handle_message.min' => '必须大于1个字符',
  25. 'complain_subject_content.require' => '投诉主题不能为空',
  26. 'complain_subject_content.max' => '必须小于50个字符',
  27. 'complain_subject_content.min' => '必须大于1个字符',
  28. 'complain_subject_desc.require' => '投诉主题描述不能为空',
  29. 'complain_subject_desc.max' => '必须小于50个字符',
  30. 'complain_subject_desc.min' => '必须大于1个字符',
  31. ];
  32. protected $scene = [
  33. 'complain_close' => ['final_handle_message'],
  34. 'complain_subject_add' => ['complain_subject_content', 'complain_subject_desc'],
  35. ];
  36. }