Hey all,
I have a form being validated that works fine when i'm using $results = $query->get(); but is ignored when I use $results = $query->Paginate(5); My validation is below. Any ideas on how I can make it work?
Thanks in advance:
$rules = array(
'field_name' => 'required_without_all:field_Name,field_name',
'field_name' => 'required_without_all:field_Name,field_name',
'field_name' => 'required_without_all:field_Name,field_name'
);
// check if the validator failed
$validator = Validator::make(Input::all(), $rules);
// check if the validator failed
if ($validator->fails()) {
// get the error messages from the validator
$messages = $validator->messages();
// redirect our user back to the form with the errors from the validator
return Redirect::to('index')
->withErrors($validator);
The answer to this issue is, you must add your validation logic before the input() information. Cheers hope this helps someone.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community