diff options
Diffstat (limited to 'src/Http/Validation')
-rw-r--r-- | src/Http/Validation/ValidatesRequest.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Http/Validation/ValidatesRequest.php b/src/Http/Validation/ValidatesRequest.php index 33ff76af..142bd129 100644 --- a/src/Http/Validation/ValidatesRequest.php +++ b/src/Http/Validation/ValidatesRequest.php @@ -17,10 +17,12 @@ trait ValidatesRequest */ protected function validate(Request $request, array $rules) { - if (!$this->validator->validate( + $isValid = $this->validator->validate( (array)$request->getParsedBody(), $rules - )) { + ); + + if (!$isValid) { throw new ValidationException($this->validator); } |