mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 23:59:51 +01:00
Create documentation for message localization
Also define the `translator` param to the related rules in `AbstractNestedException`.
This commit is contained in:
parent
311891b630
commit
937fa6b183
4 changed files with 87 additions and 0 deletions
|
|
@ -108,6 +108,19 @@ class AbstractNestedException extends ValidationException implements NestedValid
|
|||
}
|
||||
}
|
||||
|
||||
public function setParam($name, $value)
|
||||
{
|
||||
parent::setParam($name, $value);
|
||||
|
||||
if ('translator' === $name) {
|
||||
foreach ($this->getRelated(true) as $related) {
|
||||
$related->setParam($name, $value);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRelatedByName($name)
|
||||
{
|
||||
foreach ($this->getIterator(true) as $e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue