Mallconsult.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. *
  6. *
  7. * ----------------------------------------------------------------------------
  8. *
  9. * 验证器
  10. */
  11. class Mallconsult extends Validate
  12. {
  13. protected $rule = [
  14. 'mallconsulttype_name' => 'require',
  15. 'mallconsulttype_sort' => 'require|number',
  16. 'type_id' => 'require|number',
  17. 'consult_content' => 'require'
  18. ];
  19. protected $message = [
  20. 'mallconsulttype_name.require' => '请填写咨询类型名称',
  21. 'mallconsulttype_sort.require' => '请正确填写咨询类型排序',
  22. 'mallconsulttype_sort.number' => '请正确填写咨询类型排序',
  23. 'type_id.require' => '请选择咨询类型',
  24. 'type_id.number' => '请选择咨询类型',
  25. 'consult_content.require' => '请填写咨询内容'
  26. ];
  27. protected $scene = [
  28. 'type_add' => ['mallconsulttype_name', 'mallconsulttype_sort'],
  29. 'type_edit' => ['mallconsulttype_name', 'mallconsulttype_sort'],
  30. 'save_mallconsult' => ['type_id', 'consult_content'],
  31. ];
  32. }