protected function storeErrors(NestedValidationException $e, Configuration $config, array $messages = [])
    {
        $errors = [
            $e->findMessages($this->getRulesNames($config->getValidationRules()))
        ];

        // If default messages are defined
        if (!empty($this->defaultMessages)) {
            $errors[] = $e->findMessages($this->defaultMessages);
        }

        // If global messages are defined
        if (!empty($messages)) {
            $errors[] = $e->findMessages($messages);
        }

        // If individual messages are defined
        if ($config->hasMessages()) {
            $errors[] = $e->findMessages($config->getMessages());
        }

        $this->setErrors($this->mergeMessages($errors), $config->getKey(), $config->getGroup());
    }
protected function storeErrors(NestedValidationException $e, Configuration $config, array $messages = [])
    {
        $errors = [
            $e->findMessages($this->getRulesNames($config->getValidationRules()))
        ];

        // If default messages are defined
        if (!empty($this->defaultMessages)) {
            $errors[] = $e->findMessages($this->defaultMessages);
        }

        // If global messages are defined
        if (!empty($messages)) {
            $errors[] = $e->findMessages($messages);
        }

        // If individual messages are defined
        if ($config->hasMessages()) {
            $errors[] = $e->findMessages($config->getMessages());
        }

        $this->setErrors($this->mergeMessages($errors), $config->getKey(), $config->getGroup());
    }
protected function storeErrors ( NestedValidationException $ e , Configuration $ config , array $ messages = [ ] ) { $ errors = [ $ e -> findMessages ( $ this -> getRulesNames ( $ config -> getValidationRules ( ) ) ) ] ; // If default messages are defined if ( ! empty ( $ this -> defaultMessages ) ) { $ errors [ ] = $ e -> findMessages ( $ this -> defaultMessages ) ; } // If global messages are defined if ( ! empty ( $ messages ) ) { $ errors [ ] = $ e -> findMessages ( $ messages ) ; } // If individual messages are defined if ( $ config -> hasMessages ( ) ) { $ errors [ ] = $ e -> findMessages ( $ config -> getMessages ( ) ) ; } $ this -> setErrors ( $ this -> mergeMessages ( $ errors ) , $ config -> getKey ( ) , $ config -> getGroup ( ) ) ; }
Sets error messages after validation.

@param NestedValidationException $e
@param Configuration             $config
@param string[]                  $messages
Sets error messages after validation .