'require|In:0,1,2,3,4,5,6', 'end_day' => 'require|In:0,1,2,3,4,5,6', 'start_time' => 'require|number|gt:-1|lt:24', 'end_time' => 'require|number|gt:-1|lt:24', ]; /** * 定义错误信息 * @var array */ protected $message = [ 'start_day.In' => '开始天数输入的范围为0-6', 'end_day.In' => '结束天数输入的范围为0-6', 'start_time.number' => '开始时间请输入整数', 'end_time.number' => '结束时间请输入整数', 'start_time.gt' => '开始时间需大于等于0时', 'start_time.lt' => '开始时间需小于等于23时', 'end_time.gt' => '结束时间需大于等于0时', 'end_time.lt' => '结束时间需小于等于23时', ]; protected $scene = [ 'save' => [], ]; }