Message
API reference › HTML Helper › Exception › Message
Represents error message templates for attribute exceptions.
Use Message::getMessage() to format the template with sprintf() arguments.
| Case | Value | Description |
|---|---|---|
CANNOT_PARSE_PROPERTY | "Property name '%s' must contain word characters only." | Indicates that a property expression cannot be parsed. |
FORM_MODEL_NAME_CANNOT_BE_EMPTY | 'Form model name cannot be empty for tabular inputs.' | Indicates that the form model name is missing for tabular input. |
INCORRECT_DELIMITER | 'Incorrect delimiter.' | Indicates an invalid delimiter. |
INCORRECT_REGEXP | 'Incorrect regular expression or malformed pattern.' | Indicates an invalid regular expression literal. |
KEY_MUST_BE_NON_EMPTY_STRING | 'Key must be a non-empty string.' | Indicates that a key is not a non-empty string. |
LENGTH_LESS_THAN_TWO | "Length of the regular expression cannot be less than '2'." | Indicates that the regular expression literal is too short. |
VALUE_NOT_IN_LIST | "Value '%s' is not in the list of valid values for '%s': '%s'." | Indicates that a value is outside the allowed list. |
VALUE_SHOULD_BE_ARRAY_SCALAR_NULL_ENUM | "Value should be of type 'array', | Indicates that a value type is unsupported. |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
getMessage() | Returns the formatted message string for the error case. | Message |
Method details
Section titled “Method details”getMessage()
Section titled “getMessage() ”public function getMessage(int|string ...$argument): stringReturns the formatted message string for the error case.
Parameters
| Parameter | Type | Description |
|---|---|---|
...$argument | int| | Values to insert into the message template. |
Returns
string: Formatted error message with interpolated arguments.