public function reportError(string $error_message) : void
    {
        $error_message = sprintf($error_message, $this->field_name);
        if (null != $this->validation_set) {
            $this->validation_set->addValidationError(new ValidationError($this->field_name, $error_message));
        }
    }
public function reportError(string $error_message) : void
    {
        $error_message = sprintf($error_message, $this->field_name);
        if (null != $this->validation_set) {
            $this->validation_set->addValidationError(new ValidationError($this->field_name, $error_message));
        }
    }
public function reportError ( string $ error_message ) : void { $ error_message = sprintf ( $ error_message , $ this -> field_name ) ; if ( null != $ this -> validation_set ) { $ this -> validation_set -> addValidationError ( new ValidationError ( $ this -> field_name , $ error_message ) ) ; } }
Report the error message to validation set

@param string $error_message The error message to report
Report the error message to validation set