Skip to content
PHP Ecosystem
Explore

Message

API reference › Form Model › Exception › Message

enumUIAwesome\FormModel\Exception\Message
Backed bystring
Sourcesrc/Exception/Message.php

Represents reusable error message templates for form-model exceptions.

Use Message::getMessage() to format template values via sprintf() placeholders.

CaseValueDescription
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.
MethodDescriptionDefined by
getMessage()Returns the formatted message string for the error case.Message
public function getMessage(int|string ...$argument): string

Returns the formatted message string for the error case.

Usage example:

throw new InvalidArgumentException(
\UIAwesome\FormModel\Exception\Message::UNKNOWN_METADATA_METHOD->getMessage($methodName)
);

Parameters

ParameterTypeDescription
...$argumentint|stringValues to insert into the message template.

Returns

string: Formatted error message with interpolated arguments.