Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | protected function failedValidation(Validator $validator) |
||
20 | { |
||
21 | $response = new JsonResponse([ |
||
22 | 'success' => false, |
||
23 | 'message' => 'The provided data failed validation', |
||
24 | 'errors' => $validator->errors() |
||
25 | ], Response::HTTP_UNPROCESSABLE_ENTITY); |
||
26 | |||
27 | throw new ValidationException($validator, $response); |
||
28 | } |
||
29 | } |