You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[`ValidationError.defineMessage()`](#validationerrordefinemessage)| Defines the error message of a [`string`][js-string] type from the provided `message` of an [`object`][js-object]|
|[`ValidationError()`](#validationerror-constructor)| Creates a new instance with the message. If the provided `message` is an [`object`][js-object], then its properties are assigned to the instance |
130
+
131
+
<br>
132
+
133
+
## `ValidationError` static properties
134
+
135
+
### `ValidationError.template`
136
+
137
+
Template of the error message with the replaceable `[problem]` and `[fix]`.
|`message: ErrorMessage`| An [`object`][js-object] of the [`ErrorMessage`](#errormessage) interface to build a message of a [`string`][js-string] type. The value is checked against the proper [`object`][js-object]|
199
+
200
+
**Returns:**
201
+
202
+
The **return value** is a message of a `string` type created from the provided `message` of [`ErrorMessage`](#errormessage) interface, or it's an empty `string` if the provided message object isn't proper.
|`message: string \| ErrorMessage`| The message of a `string` type or of an [`ErrorMessage`](#errormessage) interface that is used to throw with an [`error`][js-error]|
242
+
243
+
**Returns:**
244
+
245
+
The **return value** is an instance of [`ValidationError`](#validationerror).
0 commit comments