12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\common\validate;
- use think\Validate;
- class DailyTask extends Validate
- {
- /**
- * 定义验证规则
- * 格式:'字段名' => ['规则1','规则2'...]
- *
- * @var array
- */
- protected $rule = [
- 'title|任务名称' => 'require|length:1,30',
- 'start_time|开始时间' => 'require',
- 'end_time|结束时间' => 'require',
- ];
- /**
- * 定义错误信息
- * 格式:'字段名.规则名' => '错误信息'
- *
- * @var array
- */
- protected $message = [
- ];
- }
|