Improve error messaging for validation exceptions
This commit is contained in:
parent
271197e823
commit
43156e8d53
4 changed files with 31 additions and 11 deletions
|
@ -57,7 +57,7 @@ abstract class Model extends IlluminateModel
|
|||
try {
|
||||
$model->validate();
|
||||
} catch (ValidationException $exception) {
|
||||
throw new DataValidationException($exception->validator);
|
||||
throw new DataValidationException($exception->validator, $model);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue