Example #1
0
 protected function validate(array $validation = null)
 {
     parent::validate($validation);
     if ($this->hasErrors()) {
         $exception = new ValidationException(join(', ', $this->getErrorsArray()), 400);
         $exception->setErrors($this->getErrorsArray());
         throw $exception;
     }
 }