'require', "act_time"=>'require|date|dateFormat:Y-m-d H:i:s', "participant"=>'require|number|in:0,1,2', "budget"=>'require|float', "require_item"=>'require|max:255', "req_corp"=>'number', "phone"=>'require|mobile', ]; /** * 提示消息 */ protected $message = [ "city"=>"请选择活动城市", "act_time"=>"请选择活动时间", "participant"=>"请选择活动人数", "budget"=>"请输入活动预算", "require_item"=>"请选择活动类型", "phone"=>"请输入正确的联系方式", // "require_item"=>"请选择活动类型", ]; /** * 验证场景 */ protected $scene = [ 'add' => ["city","act_time","participant","budget","require_item","phone",], 'edit' => ["city","act_time","participant","budget","require_item","phone",], ]; public function __construct() { parent::__construct(); } }