protected function addElementError($message)
    {
        if ($this->element === null) {
            throw new \RuntimeException('Create a form element prior to adding a validation error', 1519731421);
        }
        $this->addError($this->element->getIdentifier(), $message);
    }
protected function addElementError($message)
    {
        if ($this->element === null) {
            throw new \RuntimeException('Create a form element prior to adding a validation error', 1519731421);
        }
        $this->addError($this->element->getIdentifier(), $message);
    }
protected function addElementError ( $ message ) { if ( $ this -> element === null ) { throw new \ RuntimeException ( 'Create a form element prior to adding a validation error' , 1519731421 ) ; } $ this -> addError ( $ this -> element -> getIdentifier ( ) , $ message ) ; }
Register a validation error for the form element

@param string $message Validation error message

@throws \RuntimeException If no element has been created prior to adding an error message
Register a validation error for the form element