Mallconsult.php 1.3 KB

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