protected function addError($key, $code, array $arguments = [], $title = '')
    {
        $message = $this->addMessage(Error::class, $key, $code, $arguments, $title);
        $this->result->addError($message);
    }
protected function addError($key, $code, array $arguments = [], $title = '')
    {
        $message = $this->addMessage(Error::class, $key, $code, $arguments, $title);
        $this->result->addError($message);
    }
protected function addError ( $ key , $ code , array $ arguments = [ ] , $ title = '' ) { $ message = $ this -> addMessage ( Error :: class , $ key , $ code , $ arguments , $ title ) ; $ this -> result -> addError ( $ message ) ; }
Creates a new validation error and adds it to the result.

@param string $key
@param int    $code
@param array  $arguments
@param string $title
Creates a new validation error and adds it to the result .