src/Helpers/Form.php
public function addErrorMessages($message)
    {
        if (!empty($message)) {
            if (is_array($message)) {
                $this->errorMessages = array_merge($this->errorMessages, $message);

            } else {
                $this->errorMessages[] = $message;
            }
        }
        return $this;
    }
public function addErrorMessages($message)
    {
        if (!empty($message)) {
            if (is_array($message)) {
                $this->errorMessages = array_merge($this->errorMessages, $message);

            } else {
                $this->errorMessages[] = $message;
            }
        }
        return $this;
    }
public function addErrorMessages ( $ message ) { if ( ! empty ( $ message ) ) { if ( is_array ( $ message ) ) { $ this -> errorMessages = array_merge ( $ this -> errorMessages , $ message ) ; } else { $ this -> errorMessages [ ] = $ message ; } } return $ this ; }
Adds 1 or more error messages.

To be used by web shop specific form handling to add a message to the list
of messages to display.

@param string|string[] $message
An error message or an array of error messages. If empty, nothing
will be added.

@return $this
Adds 1 or more error messages .