# Message

> Defines widget exception message templates.

[API reference](/docs/api/index.md) › [Selectize](/docs/extensions/selectize/reference/index.md) › [exception](/docs/extensions/selectize/reference/exception/index.md) › Message

| enum | `yii2\extensions\selectize\exception\Message` |
| --- | --- |
| Backed by | `string` |
| Source | [`src/exception/Message.php`](https://github.com/yii2-extensions/selectize/blob/main/src/exception/Message.php#L14) |

Defines widget exception message templates.

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

## Cases

| Case | Value | Description |
| --- | --- | --- |
| <span id="case-INVALID_TYPE"></span>`INVALID_TYPE` | `'Invalid type "%s".'` | Error when the widget type is not supported. |

## 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.