protected function validateInput($input, Configuration $config, array $messages = []): self
    {
        try {
            $config->getValidationRules()->assert($input);
        } catch (NestedValidationException $e) {
            $this->handleValidationException($e, $config, $messages);
        }

        return $this->setValue($config->getKey(), $input, $config->getGroup());
    }
protected function validateInput($input, Configuration $config, array $messages = []): self
    {
        try {
            $config->getValidationRules()->assert($input);
        } catch (NestedValidationException $e) {
            $this->handleValidationException($e, $config, $messages);
        }

        return $this->setValue($config->getKey(), $input, $config->getGroup());
    }
protected function validateInput ( $ input , Configuration $ config , array $ messages = [ ] ) : self { try { $ config -> getValidationRules ( ) -> assert ( $ input ) ; } catch ( NestedValidationException $ e ) { $ this -> handleValidationException ( $ e , $ config , $ messages ) ; } return $ this -> setValue ( $ config -> getKey ( ) , $ input , $ config -> getGroup ( ) ) ; }
Executes the validation of a value and handles errors.

@param mixed         $input
@param Configuration $config
@param string[]      $messages

@return self
Executes the validation of a value and handles errors .