I read the official page about validation in laravel http://laravel.com/docs/validation#working-with-error-messages and I followed them. So my code is
$input = Input::all();
$validation = Validator::make($input, Restaurant::$rules);
if ($validation->passes())
{
Restaurant::create($input);
return Redirect::route('users.index');
}
else{
$messages = $validation->messages();
foreach ($messages->all() as $message)
{
echo $message + "</br>";
}
}
I can see the error message but it is just 00. Is there a better way to know in which form's field the error is and what is the error description?
I already have rules and I now the input is breaking the rules but I need to read the error message