Message
API reference › HTML Attribute › Exception › Message
Represents error message templates for attribute exceptions.
Use Message::getMessage() to format the template with sprintf() arguments.
| Case | Value | Description |
|---|---|---|
ATTRIBUTE_INVALID_VALUE | "Invalid value '%s' for attribute '%s'. Expected: '%s'." | Error when an attribute value is invalid. |
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.