In Hall model,
public static $rules = array(
'name' => 'required',
'capacity' => 'required|numeric',
'street_number' => 'required',
'route' => 'required',
'locality' => 'required',
'state' => 'required',
'postcode' => 'required',
'email' => 'email',
'appointedd_appid' => 'required_if:isbooking_enabled,1',
);
public static function messages()
{
return [
'appointedd_appid.required_if' => 'The appointedd appid field is required when enable booking is checked.'
];
}
I have added inside $rules as shown above and use it in the controller
$validation = Validator::make(Input::all(), Hall::$rules, Hall::messages());
'appointedd_appid' => 'required_if:isbooking_enabled,1',
public static function messages()
{
return [
'appointedd_appid.required_if' => 'The appointedd appid field is required when enable booking is checked.'
];
}
but when I deploy it to prod, it is interrupting the whole project. It seems like the whole server is down. but when I remove these code everything works. What is causing these issue only in prod? I have these project in laravel 4.2. Is there any other way to use required_if apart from the defined above and using custom message in validation.php.