Mallconsult.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
  9. * 网站地址: https://www.valimart.net/
  10. * ----------------------------------------------------------------------------
  11. *
  12. * ============================================================================
  13. * 验证器
  14. */
  15. class Mallconsult extends Validate
  16. {
  17. protected $rule = [
  18. 'mallconsulttype_name'=>'require',
  19. 'mallconsulttype_sort'=>'require|number',
  20. 'type_id'=>'require|number',
  21. 'consult_content'=>'require'
  22. ];
  23. protected $message = [
  24. 'mallconsulttype_name.require'=>'请填写咨询类型名称',
  25. 'mallconsulttype_sort.require'=>'请正确填写咨询类型排序',
  26. 'mallconsulttype_sort.number'=>'请正确填写咨询类型排序',
  27. 'type_id.require'=>'请选择咨询类型',
  28. 'type_id.number'=>'请选择咨询类型',
  29. 'consult_content.require'=>'请填写咨询内容'
  30. ];
  31. protected $scene = [
  32. 'type_add' => ['mallconsulttype_name', 'mallconsulttype_sort'],
  33. 'type_edit' => ['mallconsulttype_name', 'mallconsulttype_sort'],
  34. 'save_mallconsult' => ['type_id', 'consult_content'],
  35. ];
  36. }