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
Copy file name to clipboardExpand all lines: README.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,7 +192,7 @@ Manages an [`Error`][js-error] of validation.
192
192
193
193
![update]
194
194
195
-
A template of the error message guarded by [`string`][js-string] type with the replaceable `[problem]` and `[fix]` words. By default, it's set to `Problem: [problem] => Fix: [fix]`.
195
+
A template of the error message guarded by [`string`][js-string] type with the replaceable `[problem]` and `[fix]` words. By default, it's set to `Problem: [problem] => Fix: [fix]`. It can be set directly or by the [`setTemplate()`][error-method-settemplate] and [`setMessage()`][error-method-setmessage] method.
196
196
197
197
```typescript
198
198
staticgettemplate(): string {
@@ -215,7 +215,7 @@ static set template(value: string) {
215
215
216
216
![update]
217
217
218
-
A possible solution to the described [`problem`][error-property-problem] of validation that is guarded by a [`string`][js-string] type. By default, it's an empty [`string`][js-string].
218
+
A possible solution to the described [`problem`][error-property-problem] of validation that is guarded by a [`string`][js-string] type. By default, it's an empty [`string`][js-string]. It can be set directly or by the [`setFix()`][error-method-setfix] and [`setMessage()`][error-method-setmessage] method.
219
219
220
220
```typescript
221
221
publicgetfix(): string {
@@ -230,7 +230,9 @@ public set fix(value: string) {
230
230
231
231
#### `ValidationError.prototype.message`
232
232
233
-
A validation error message guarded by a [`string`][js-string] type that can be build from the [`problem`][error-property-problem] and [`fix`][error-property-fix] of [`ValidationError`](#validationerror) on the [`template`][error-property-template].
233
+
![update]
234
+
235
+
A validation error message guarded by a [`string`][js-string] type that can be build from the [`problem`][error-property-problem] and [`fix`][error-property-fix] of [`ValidationError`](#validationerror) on the [`template`][error-property-template]. It can be set directly or by the [`throw()`][error-method-throw] and [`setMessage()`][error-method-setmessage] method.
234
236
235
237
```typescript
236
238
publicsetmessage(value: string) {
@@ -245,8 +247,6 @@ public get message(): string {
245
247
246
248
#### `ValidationError.prototype.name`
247
249
248
-
![update]
249
-
250
250
Error name of a [`string`][js-string] type that is being thrown. By default, it's ['ValidationError'](#validationerror).
251
251
252
252
```typescript
@@ -259,7 +259,7 @@ public name = ValidationError.name;
259
259
260
260
![update]
261
261
262
-
Description of a validation [`problem`][error-property-problem] guarded by a [`string`][js-string] type. By default, it's an empty [`string`][js-string].
262
+
Description of a validation [`problem`][error-property-problem] guarded by a [`string`][js-string] type. By default, it's an empty [`string`][js-string]. It can be set directly or by the [`setProblem()`][error-method-setproblem] and [`setMessage()`][error-method-setmessage] method.
263
263
264
264
```typescript
265
265
publicgetproblem(): string {
@@ -283,6 +283,7 @@ public set problem(value: string) {
283
283
Defines the validation error message of a [`string`][js-string] type from the provided `message` of the [`ErrorMessage`](#errormessage) interface.
0 commit comments