Update Core\Validator for new Fork\__() function
Now an error array contains untranslated strings or template arrays. Translation must be made in the output template iswev.
This commit is contained in:
parent
decb014b9c
commit
be429ea4c3
1 changed files with 5 additions and 4 deletions
|
@ -371,7 +371,7 @@ class Validator
|
|||
list($type, $error) = $error;
|
||||
}
|
||||
|
||||
$this->errors[$type][] = __([$error, [':alias' => __($alias), ':attr' => $attr]]);
|
||||
$this->errors[$type][] = [$error, [':alias' => __($alias), ':attr' => $attr]];
|
||||
$this->error = true;
|
||||
}
|
||||
|
||||
|
@ -440,9 +440,10 @@ class Validator
|
|||
public function getErrorsWithoutType(): array
|
||||
{
|
||||
$result = [];
|
||||
\array_walk_recursive($this->errors, function ($item) use (&$result) {
|
||||
$result[] = $item;
|
||||
});
|
||||
|
||||
foreach ($this->errors as $errors) {
|
||||
\array_push($result, ...$errors);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue