We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70a5216 commit d06a6adCopy full SHA for d06a6ad
src/Pecee/Http/Input/Exceptions/InputValidationException.php
@@ -35,7 +35,15 @@ public function getErrorMessages(): array
35
{
36
if($this->getValidation() === null)
37
return array();
38
- return $this->getValidation()->errors()->all();
+ $errors = array();
39
+ foreach ($this->getValidation()->errors()->toArray() as $key => $rule_errors){
40
+ foreach ($rule_errors as $rule => $message){
41
+ if(!isset($errors[$key]))
42
+ $errors[$key] = array();
43
+ $errors[$key][$rule] = (string) $message;
44
+ }
45
46
+ return $errors;
47
}
48
49
/**
0 commit comments