Consulting.php 771 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. *
  6. *
  7. * ----------------------------------------------------------------------------
  8. *
  9. * 验证器
  10. */
  11. class Consulting extends Validate
  12. {
  13. protected $rule = array(
  14. 'consulttype_name' => 'require',
  15. 'consulttype_sort' => 'require|number',
  16. );
  17. protected $message = array(
  18. 'consulttype_name.require' => '请填写咨询类型名称',
  19. 'consulttype_sort.require' => '请正确填写咨询类型排序',
  20. 'consulttype_sort.number' => '请正确填写咨询类型排序',
  21. );
  22. protected $scene = [
  23. 'type_add' => ['consulttype_name', 'sort'],
  24. 'type_edit' => ['consulttype_name', 'sort'],
  25. ];
  26. }