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