MateCate.php 459 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\common\validate;
  3. use think\Db;
  4. use think\Validate;
  5. class MateCate extends Validate
  6. {
  7. /**
  8. * 定义验证规则
  9. * 格式:'字段名' => ['规则1','规则2'...]
  10. *
  11. * @var array
  12. */
  13. protected $rule = [
  14. 'title|名称' => 'require',
  15. ];
  16. /**
  17. * 定义错误信息
  18. * 格式:'字段名.规则名' => '错误信息'
  19. *
  20. * @var array
  21. */
  22. protected $message = [];
  23. }