Correctly json_encode validation errors.
This commit is contained in:
parent
05d2a6d370
commit
5bbded2c03
7 changed files with 16 additions and 16 deletions
|
@ -141,7 +141,7 @@ class APIRepository
|
|||
// Run validator, throw catchable and displayable exception if it fails.
|
||||
// Exception includes a JSON result of failed validation rules.
|
||||
if ($validator->fails()) {
|
||||
throw new DisplayValidationException($validator->errors());
|
||||
throw new DisplayValidationException(json_encode($validator->errors()));
|
||||
}
|
||||
|
||||
DB::beginTransaction();
|
||||
|
|
Reference in a new issue