Message
API reference › Form Model › Exception › Message
Represents reusable error message templates for form-model exceptions.
Use Message::getMessage() to format template values via sprintf() placeholders.
| Case | Value | Description |
|---|---|---|
INVALID_NESTED_FIELD_PATH | "Invalid nested field path format: '%s'." | Indicates invalid dot-notated nested field path syntax. |
UNKNOWN_METADATA_METHOD | "Unknown metadata method: '%s'." | Indicates an unknown top-level metadata method. |
UNKNOWN_NESTED_METADATA_METHOD | "Unknown nested metadata method: '%s'." | Indicates an unknown nested metadata method. |
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.
Usage example:
throw new InvalidArgumentException( \UIAwesome\FormModel\Exception\Message::UNKNOWN_METADATA_METHOD->getMessage($methodName));Parameters
| Parameter | Type | Description |
|---|---|---|
...$argument | int| | Values to insert into the message template. |
Returns
string: Formatted error message with interpolated arguments.