0
0

GreenTask.php 570 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. class GreenTask extends Validate
  5. {
  6. /**
  7. * 定义验证规则
  8. * 格式:'字段名' => ['规则1','规则2'...]
  9. *
  10. * @var array
  11. */
  12. protected $rule = [
  13. 'title|任务名称' => 'require|length:1,30',
  14. 'start_time|开始时间' => 'require',
  15. 'end_time|结束时间' => 'require',
  16. ];
  17. /**
  18. * 定义错误信息
  19. * 格式:'字段名.规则名' => '错误信息'
  20. *
  21. * @var array
  22. */
  23. protected $message = [
  24. ];
  25. }