12345678910111213141516171819202122232425262728 |
- <?php
- namespace app\admin\validate\life;
- use think\Validate;
- class BookSchedulingValidate extends Validate
- {
- protected $rule = [
- 'scheduling_book_id' => 'require',
- 'scheduling_id' => 'require',
- 'scheduling_start_time' => 'require',
- 'scheduling_end_time' => 'require',
- ];
- protected $message = [
- 'scheduling_id.require' => '课程排期ID不能为空',
- 'scheduling_book_id.require' => '课程ID名称不能为空',
- 'scheduling_start_time.require' => '开始时间不能为空',
- 'scheduling_end_time.require' => '结束时间不能为空',
- ];
- //场景
- protected $scene = [
- 'create' => ['scheduling_book_id','scheduling_start_time','scheduling_end_time'],
- 'update' => ['scheduling_id','scheduling_book_id','scheduling_start_time','scheduling_end_time'],
- 'info' => ['scheduling_id']
- ];
- }
|