# Message

> Represents error message templates for attribute exceptions.

[API reference](/docs/api/index.md) › [HTML Helper](/docs/extensions/html-helper/reference/index.md) › [Exception](/docs/extensions/html-helper/reference/exception/index.md) › Message

| enum | `UIAwesome\Html\Helper\Exception\Message` |
| --- | --- |
| Backed by | `string` |
| Source | [`src/Exception/Message.php`](https://github.com/ui-awesome/html-helper/blob/main/src/Exception/Message.php#L14) |

Represents error message templates for attribute exceptions.

Use [`Message::getMessage()`](/docs/extensions/html-helper/reference/exception/message/index.md#method-getMessage) to format the template with `sprintf()` arguments.

## Cases

| Case | Value | Description |
| --- | --- | --- |
| <span id="case-CANNOT_PARSE_PROPERTY"></span>`CANNOT_PARSE_PROPERTY` | `"Property name '%s' must contain word characters only."` | Indicates that a property expression cannot be parsed. |
| <span id="case-FORM_MODEL_NAME_CANNOT_BE_EMPTY"></span>`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. |
| <span id="case-INCORRECT_DELIMITER"></span>`INCORRECT_DELIMITER` | `'Incorrect delimiter.'` | Indicates an invalid delimiter. |
| <span id="case-INCORRECT_REGEXP"></span>`INCORRECT_REGEXP` | `'Incorrect regular expression or malformed pattern.'` | Indicates an invalid regular expression literal. |
| <span id="case-KEY_MUST_BE_NON_EMPTY_STRING"></span>`KEY_MUST_BE_NON_EMPTY_STRING` | `'Key must be a non-empty string.'` | Indicates that a key is not a non-empty `string`. |
| <span id="case-LENGTH_LESS_THAN_TWO"></span>`LENGTH_LESS_THAN_TWO` | `"Length of the regular expression cannot be less than '2'."` | Indicates that the regular expression literal is too short. |
| <span id="case-VALUE_NOT_IN_LIST"></span>`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. |
| <span id="case-VALUE_SHOULD_BE_ARRAY_SCALAR_NULL_ENUM"></span>`VALUE_SHOULD_BE_ARRAY_SCALAR_NULL_ENUM` | `"Value should be of type 'array', 'scalar', 'null', or 'enum'; " . "'%s' given."` | Indicates that a value type is unsupported. |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`getMessage()`](#method-getMessage) | Returns the formatted message string for the error case. | `Message` |

## Method details

### getMessage() <span id="method-getMessage"></span>

```php
public function getMessage(int|string ...$argument): string
```

Returns the formatted message string for the error case.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `...$argument` | `int\|string` | Values to insert into the message template. |

**Returns**

`string`: Formatted error message with interpolated arguments.