You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i used your validation library . its nice and helped a lot to me . but now i am getting one issue . i need to show the error messages only as a response . how can i achieve this ?
my code is
$dog = new dog(Input::all());
if (Request::ajax()) {
if (!$dog->save()) {
if ($dog->hasErrors()) {
return Response::json(array(
'success' => false,
'errors' => $dog->getErrors(),
), 200);
}
}
}
The text was updated successfully, but these errors were encountered:
This isn't a bug. You can include the errors in an Ajax response by calling $dog->getErrors()->toArray(). This is necessary as the messages attribute of the object returned by getErrors() is protected
i used your validation library . its nice and helped a lot to me . but now i am getting one issue . i need to show the error messages only as a response . how can i achieve this ?
my code is
The text was updated successfully, but these errors were encountered: