@twin.org/core 0.0.1-next.4 → 0.0.1-next.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1379 -738
- package/dist/esm/index.mjs +1376 -739
- package/dist/types/encoding/base58.d.ts +18 -0
- package/dist/types/factories/factory.d.ts +20 -1
- package/dist/types/helpers/envHelper.d.ts +16 -0
- package/dist/types/helpers/jsonHelper.d.ts +29 -0
- package/dist/types/helpers/objectHelper.d.ts +33 -0
- package/dist/types/helpers/uint8ArrayHelper.d.ts +11 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/models/IComponent.d.ts +12 -3
- package/dist/types/models/coerceType.d.ts +49 -0
- package/dist/types/models/compressionType.d.ts +1 -1
- package/dist/types/utils/coerce.d.ts +22 -0
- package/dist/types/utils/converter.d.ts +12 -0
- package/dist/types/utils/guards.d.ts +16 -0
- package/dist/types/utils/is.d.ts +12 -0
- package/dist/types/utils/validation.d.ts +2 -0
- package/docs/changelog.md +1 -1
- package/docs/reference/classes/AlreadyExistsError.md +67 -25
- package/docs/reference/classes/ArrayHelper.md +6 -2
- package/docs/reference/classes/AsyncCache.md +18 -6
- package/docs/reference/classes/Base32.md +6 -2
- package/docs/reference/classes/Base58.md +61 -0
- package/docs/reference/classes/Base64.md +9 -3
- package/docs/reference/classes/Base64Url.md +6 -2
- package/docs/reference/classes/BaseError.md +65 -23
- package/docs/reference/classes/BitString.md +18 -6
- package/docs/reference/classes/Coerce.md +104 -8
- package/docs/reference/classes/Compression.md +12 -4
- package/docs/reference/classes/ConflictError.md +70 -26
- package/docs/reference/classes/Converter.md +104 -20
- package/docs/reference/classes/EnvHelper.md +43 -0
- package/docs/reference/classes/ErrorHelper.md +9 -3
- package/docs/reference/classes/Factory.md +78 -10
- package/docs/reference/classes/FilenameHelper.md +3 -1
- package/docs/reference/classes/GeneralError.md +65 -25
- package/docs/reference/classes/GuardError.md +70 -26
- package/docs/reference/classes/Guards.md +284 -72
- package/docs/reference/classes/HexHelper.md +15 -5
- package/docs/reference/classes/I18n.md +42 -16
- package/docs/reference/classes/Is.md +156 -40
- package/docs/reference/classes/JsonHelper.md +133 -5
- package/docs/reference/classes/NotFoundError.md +67 -25
- package/docs/reference/classes/NotImplementedError.md +61 -23
- package/docs/reference/classes/NotSupportedError.md +64 -24
- package/docs/reference/classes/ObjectHelper.md +188 -20
- package/docs/reference/classes/RandomHelper.md +3 -1
- package/docs/reference/classes/StringHelper.md +51 -17
- package/docs/reference/classes/Uint8ArrayHelper.md +35 -0
- package/docs/reference/classes/UnauthorizedError.md +64 -24
- package/docs/reference/classes/UnprocessableError.md +65 -25
- package/docs/reference/classes/Url.md +30 -10
- package/docs/reference/classes/Urn.md +54 -18
- package/docs/reference/classes/Validation.md +313 -107
- package/docs/reference/classes/ValidationError.md +64 -24
- package/docs/reference/index.md +5 -0
- package/docs/reference/interfaces/IComponent.md +30 -8
- package/docs/reference/interfaces/IError.md +1 -1
- package/docs/reference/interfaces/ILocaleDictionary.md +1 -1
- package/docs/reference/interfaces/IValidationFailure.md +1 -1
- package/docs/reference/type-aliases/CoerceType.md +5 -0
- package/docs/reference/variables/CoerceType.md +67 -0
- package/docs/reference/variables/CompressionType.md +1 -1
- package/locales/en.json +18 -1
- package/package.json +6 -6
|
@@ -22,19 +22,27 @@ Is the property null or undefined.
|
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##### property
|
|
26
|
+
|
|
27
|
+
`string`
|
|
26
28
|
|
|
27
29
|
The name of the property.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
##### value
|
|
32
|
+
|
|
33
|
+
`unknown`
|
|
30
34
|
|
|
31
35
|
The value to test.
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
##### failures
|
|
38
|
+
|
|
39
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
34
40
|
|
|
35
41
|
The list of failures to add to.
|
|
36
42
|
|
|
37
|
-
|
|
43
|
+
##### fieldNameResource?
|
|
44
|
+
|
|
45
|
+
`string`
|
|
38
46
|
|
|
39
47
|
Optional i18n resource of the field name to display in the message.
|
|
40
48
|
|
|
@@ -54,19 +62,27 @@ Is the property is not null or undefined.
|
|
|
54
62
|
|
|
55
63
|
#### Parameters
|
|
56
64
|
|
|
57
|
-
|
|
65
|
+
##### property
|
|
66
|
+
|
|
67
|
+
`string`
|
|
58
68
|
|
|
59
69
|
The name of the property.
|
|
60
70
|
|
|
61
|
-
|
|
71
|
+
##### value
|
|
72
|
+
|
|
73
|
+
`unknown`
|
|
62
74
|
|
|
63
75
|
The value to test.
|
|
64
76
|
|
|
65
|
-
|
|
77
|
+
##### failures
|
|
78
|
+
|
|
79
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
66
80
|
|
|
67
81
|
The list of failures to add to.
|
|
68
82
|
|
|
69
|
-
|
|
83
|
+
##### fieldNameResource?
|
|
84
|
+
|
|
85
|
+
`string`
|
|
70
86
|
|
|
71
87
|
Optional i18n resource of the field name to display in the message.
|
|
72
88
|
|
|
@@ -86,31 +102,49 @@ Is the property a string.
|
|
|
86
102
|
|
|
87
103
|
#### Parameters
|
|
88
104
|
|
|
89
|
-
|
|
105
|
+
##### property
|
|
106
|
+
|
|
107
|
+
`string`
|
|
90
108
|
|
|
91
109
|
The name of the property.
|
|
92
110
|
|
|
93
|
-
|
|
111
|
+
##### value
|
|
112
|
+
|
|
113
|
+
`unknown`
|
|
94
114
|
|
|
95
115
|
The value to test.
|
|
96
116
|
|
|
97
|
-
|
|
117
|
+
##### failures
|
|
118
|
+
|
|
119
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
98
120
|
|
|
99
121
|
The list of failures to add to.
|
|
100
122
|
|
|
101
|
-
|
|
123
|
+
##### fieldNameResource?
|
|
124
|
+
|
|
125
|
+
`string`
|
|
102
126
|
|
|
103
127
|
Optional i18n resource of the field name to display in the message.
|
|
104
128
|
|
|
105
|
-
|
|
129
|
+
##### options?
|
|
106
130
|
|
|
107
131
|
Additional options for the validation.
|
|
108
132
|
|
|
109
|
-
|
|
133
|
+
###### format
|
|
134
|
+
|
|
135
|
+
`RegExp` \| `"base64"` \| `"base58"` \| `"hex"`
|
|
136
|
+
|
|
137
|
+
Specific format to check.
|
|
138
|
+
|
|
139
|
+
###### minLength
|
|
140
|
+
|
|
141
|
+
`number`
|
|
110
142
|
|
|
111
143
|
The minimum length of the string.
|
|
112
144
|
|
|
113
|
-
|
|
145
|
+
###### maxLength
|
|
146
|
+
|
|
147
|
+
`number`
|
|
114
148
|
|
|
115
149
|
The maximum length of the string.
|
|
116
150
|
|
|
@@ -130,31 +164,43 @@ Is the property a string with a value.
|
|
|
130
164
|
|
|
131
165
|
#### Parameters
|
|
132
166
|
|
|
133
|
-
|
|
167
|
+
##### property
|
|
168
|
+
|
|
169
|
+
`string`
|
|
134
170
|
|
|
135
171
|
The name of the property.
|
|
136
172
|
|
|
137
|
-
|
|
173
|
+
##### value
|
|
174
|
+
|
|
175
|
+
`unknown`
|
|
138
176
|
|
|
139
177
|
The value to test.
|
|
140
178
|
|
|
141
|
-
|
|
179
|
+
##### failures
|
|
180
|
+
|
|
181
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
142
182
|
|
|
143
183
|
The list of failures to add to.
|
|
144
184
|
|
|
145
|
-
|
|
185
|
+
##### fieldNameResource?
|
|
186
|
+
|
|
187
|
+
`string`
|
|
146
188
|
|
|
147
189
|
Optional i18n resource of the field name to display in the message.
|
|
148
190
|
|
|
149
|
-
|
|
191
|
+
##### options?
|
|
150
192
|
|
|
151
193
|
Additional options for the validation.
|
|
152
194
|
|
|
153
|
-
|
|
195
|
+
###### minLength
|
|
196
|
+
|
|
197
|
+
`number`
|
|
154
198
|
|
|
155
199
|
The minimum length of the string.
|
|
156
200
|
|
|
157
|
-
|
|
201
|
+
###### maxLength
|
|
202
|
+
|
|
203
|
+
`number`
|
|
158
204
|
|
|
159
205
|
The maximum length of the string.
|
|
160
206
|
|
|
@@ -174,31 +220,43 @@ Is the property a number.
|
|
|
174
220
|
|
|
175
221
|
#### Parameters
|
|
176
222
|
|
|
177
|
-
|
|
223
|
+
##### property
|
|
224
|
+
|
|
225
|
+
`string`
|
|
178
226
|
|
|
179
227
|
The name of the property.
|
|
180
228
|
|
|
181
|
-
|
|
229
|
+
##### value
|
|
230
|
+
|
|
231
|
+
`unknown`
|
|
182
232
|
|
|
183
233
|
The value to test.
|
|
184
234
|
|
|
185
|
-
|
|
235
|
+
##### failures
|
|
236
|
+
|
|
237
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
186
238
|
|
|
187
239
|
The list of failures to add to.
|
|
188
240
|
|
|
189
|
-
|
|
241
|
+
##### fieldNameResource?
|
|
242
|
+
|
|
243
|
+
`string`
|
|
190
244
|
|
|
191
245
|
Optional i18n resource of the field name to display in the message.
|
|
192
246
|
|
|
193
|
-
|
|
247
|
+
##### options?
|
|
194
248
|
|
|
195
249
|
Additional options for the validation.
|
|
196
250
|
|
|
197
|
-
|
|
251
|
+
###### minValue
|
|
252
|
+
|
|
253
|
+
`number`
|
|
198
254
|
|
|
199
255
|
The minimum value of the number.
|
|
200
256
|
|
|
201
|
-
|
|
257
|
+
###### maxValue
|
|
258
|
+
|
|
259
|
+
`number`
|
|
202
260
|
|
|
203
261
|
The maximum value of the number.
|
|
204
262
|
|
|
@@ -218,31 +276,43 @@ Is the property an integer.
|
|
|
218
276
|
|
|
219
277
|
#### Parameters
|
|
220
278
|
|
|
221
|
-
|
|
279
|
+
##### property
|
|
280
|
+
|
|
281
|
+
`string`
|
|
222
282
|
|
|
223
283
|
The name of the property.
|
|
224
284
|
|
|
225
|
-
|
|
285
|
+
##### value
|
|
286
|
+
|
|
287
|
+
`unknown`
|
|
226
288
|
|
|
227
289
|
The value to test.
|
|
228
290
|
|
|
229
|
-
|
|
291
|
+
##### failures
|
|
292
|
+
|
|
293
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
230
294
|
|
|
231
295
|
The list of failures to add to.
|
|
232
296
|
|
|
233
|
-
|
|
297
|
+
##### fieldNameResource?
|
|
298
|
+
|
|
299
|
+
`string`
|
|
234
300
|
|
|
235
301
|
Optional i18n resource of the field name to display in the message.
|
|
236
302
|
|
|
237
|
-
|
|
303
|
+
##### options?
|
|
238
304
|
|
|
239
305
|
Additional options for the validation.
|
|
240
306
|
|
|
241
|
-
|
|
307
|
+
###### minValue
|
|
308
|
+
|
|
309
|
+
`number`
|
|
242
310
|
|
|
243
311
|
The minimum value of the integer.
|
|
244
312
|
|
|
245
|
-
|
|
313
|
+
###### maxValue
|
|
314
|
+
|
|
315
|
+
`number`
|
|
246
316
|
|
|
247
317
|
The maximum value of the integer.
|
|
248
318
|
|
|
@@ -262,31 +332,43 @@ Is the property a bigint.
|
|
|
262
332
|
|
|
263
333
|
#### Parameters
|
|
264
334
|
|
|
265
|
-
|
|
335
|
+
##### property
|
|
336
|
+
|
|
337
|
+
`string`
|
|
266
338
|
|
|
267
339
|
The name of the property.
|
|
268
340
|
|
|
269
|
-
|
|
341
|
+
##### value
|
|
342
|
+
|
|
343
|
+
`unknown`
|
|
270
344
|
|
|
271
345
|
The value to test.
|
|
272
346
|
|
|
273
|
-
|
|
347
|
+
##### failures
|
|
348
|
+
|
|
349
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
274
350
|
|
|
275
351
|
The list of failures to add to.
|
|
276
352
|
|
|
277
|
-
|
|
353
|
+
##### fieldNameResource?
|
|
354
|
+
|
|
355
|
+
`string`
|
|
278
356
|
|
|
279
357
|
Optional i18n resource of the field name to display in the message.
|
|
280
358
|
|
|
281
|
-
|
|
359
|
+
##### options?
|
|
282
360
|
|
|
283
361
|
Additional options for the validation.
|
|
284
362
|
|
|
285
|
-
|
|
363
|
+
###### minValue
|
|
364
|
+
|
|
365
|
+
`bigint`
|
|
286
366
|
|
|
287
367
|
The minimum value of the bigint.
|
|
288
368
|
|
|
289
|
-
|
|
369
|
+
###### maxValue
|
|
370
|
+
|
|
371
|
+
`bigint`
|
|
290
372
|
|
|
291
373
|
The maximum value of the bigint.
|
|
292
374
|
|
|
@@ -306,19 +388,27 @@ Is the property a boolean.
|
|
|
306
388
|
|
|
307
389
|
#### Parameters
|
|
308
390
|
|
|
309
|
-
|
|
391
|
+
##### property
|
|
392
|
+
|
|
393
|
+
`string`
|
|
310
394
|
|
|
311
395
|
The name of the property.
|
|
312
396
|
|
|
313
|
-
|
|
397
|
+
##### value
|
|
398
|
+
|
|
399
|
+
`unknown`
|
|
314
400
|
|
|
315
401
|
The value to test.
|
|
316
402
|
|
|
317
|
-
|
|
403
|
+
##### failures
|
|
404
|
+
|
|
405
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
318
406
|
|
|
319
407
|
The list of failures to add to.
|
|
320
408
|
|
|
321
|
-
|
|
409
|
+
##### fieldNameResource?
|
|
410
|
+
|
|
411
|
+
`string`
|
|
322
412
|
|
|
323
413
|
Optional i18n resource of the field name to display in the message.
|
|
324
414
|
|
|
@@ -338,19 +428,27 @@ Is the property a date.
|
|
|
338
428
|
|
|
339
429
|
#### Parameters
|
|
340
430
|
|
|
341
|
-
|
|
431
|
+
##### property
|
|
432
|
+
|
|
433
|
+
`string`
|
|
342
434
|
|
|
343
435
|
The name of the property.
|
|
344
436
|
|
|
345
|
-
|
|
437
|
+
##### value
|
|
438
|
+
|
|
439
|
+
`unknown`
|
|
346
440
|
|
|
347
441
|
The value to test.
|
|
348
442
|
|
|
349
|
-
|
|
443
|
+
##### failures
|
|
444
|
+
|
|
445
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
350
446
|
|
|
351
447
|
The list of failures to add to.
|
|
352
448
|
|
|
353
|
-
|
|
449
|
+
##### fieldNameResource?
|
|
450
|
+
|
|
451
|
+
`string`
|
|
354
452
|
|
|
355
453
|
Optional i18n resource of the field name to display in the message.
|
|
356
454
|
|
|
@@ -370,19 +468,27 @@ Is the property a date in ISO 8601 format.
|
|
|
370
468
|
|
|
371
469
|
#### Parameters
|
|
372
470
|
|
|
373
|
-
|
|
471
|
+
##### property
|
|
472
|
+
|
|
473
|
+
`string`
|
|
374
474
|
|
|
375
475
|
The name of the property.
|
|
376
476
|
|
|
377
|
-
|
|
477
|
+
##### value
|
|
478
|
+
|
|
479
|
+
`unknown`
|
|
378
480
|
|
|
379
481
|
The value to test.
|
|
380
482
|
|
|
381
|
-
|
|
483
|
+
##### failures
|
|
484
|
+
|
|
485
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
382
486
|
|
|
383
487
|
The list of failures to add to.
|
|
384
488
|
|
|
385
|
-
|
|
489
|
+
##### fieldNameResource?
|
|
490
|
+
|
|
491
|
+
`string`
|
|
386
492
|
|
|
387
493
|
Optional i18n resource of the field name to display in the message.
|
|
388
494
|
|
|
@@ -402,19 +508,27 @@ Is the property a date/time in ISO 8601 format.
|
|
|
402
508
|
|
|
403
509
|
#### Parameters
|
|
404
510
|
|
|
405
|
-
|
|
511
|
+
##### property
|
|
512
|
+
|
|
513
|
+
`string`
|
|
406
514
|
|
|
407
515
|
The name of the property.
|
|
408
516
|
|
|
409
|
-
|
|
517
|
+
##### value
|
|
518
|
+
|
|
519
|
+
`unknown`
|
|
410
520
|
|
|
411
521
|
The value to test.
|
|
412
522
|
|
|
413
|
-
|
|
523
|
+
##### failures
|
|
524
|
+
|
|
525
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
414
526
|
|
|
415
527
|
The list of failures to add to.
|
|
416
528
|
|
|
417
|
-
|
|
529
|
+
##### fieldNameResource?
|
|
530
|
+
|
|
531
|
+
`string`
|
|
418
532
|
|
|
419
533
|
Optional i18n resource of the field name to display in the message.
|
|
420
534
|
|
|
@@ -434,19 +548,27 @@ Is the property a time in ISO 8601 format.
|
|
|
434
548
|
|
|
435
549
|
#### Parameters
|
|
436
550
|
|
|
437
|
-
|
|
551
|
+
##### property
|
|
552
|
+
|
|
553
|
+
`string`
|
|
438
554
|
|
|
439
555
|
The name of the property.
|
|
440
556
|
|
|
441
|
-
|
|
557
|
+
##### value
|
|
558
|
+
|
|
559
|
+
`unknown`
|
|
442
560
|
|
|
443
561
|
The value to test.
|
|
444
562
|
|
|
445
|
-
|
|
563
|
+
##### failures
|
|
564
|
+
|
|
565
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
446
566
|
|
|
447
567
|
The list of failures to add to.
|
|
448
568
|
|
|
449
|
-
|
|
569
|
+
##### fieldNameResource?
|
|
570
|
+
|
|
571
|
+
`string`
|
|
450
572
|
|
|
451
573
|
Optional i18n resource of the field name to display in the message.
|
|
452
574
|
|
|
@@ -466,19 +588,27 @@ Is the property a timestamp in milliseconds.
|
|
|
466
588
|
|
|
467
589
|
#### Parameters
|
|
468
590
|
|
|
469
|
-
|
|
591
|
+
##### property
|
|
592
|
+
|
|
593
|
+
`string`
|
|
470
594
|
|
|
471
595
|
The name of the property.
|
|
472
596
|
|
|
473
|
-
|
|
597
|
+
##### value
|
|
598
|
+
|
|
599
|
+
`unknown`
|
|
474
600
|
|
|
475
601
|
The value to test.
|
|
476
602
|
|
|
477
|
-
|
|
603
|
+
##### failures
|
|
604
|
+
|
|
605
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
478
606
|
|
|
479
607
|
The list of failures to add to.
|
|
480
608
|
|
|
481
|
-
|
|
609
|
+
##### fieldNameResource?
|
|
610
|
+
|
|
611
|
+
`string`
|
|
482
612
|
|
|
483
613
|
Optional i18n resource of the field name to display in the message.
|
|
484
614
|
|
|
@@ -498,19 +628,27 @@ Is the property a timestamp in seconds.
|
|
|
498
628
|
|
|
499
629
|
#### Parameters
|
|
500
630
|
|
|
501
|
-
|
|
631
|
+
##### property
|
|
632
|
+
|
|
633
|
+
`string`
|
|
502
634
|
|
|
503
635
|
The name of the property.
|
|
504
636
|
|
|
505
|
-
|
|
637
|
+
##### value
|
|
638
|
+
|
|
639
|
+
`unknown`
|
|
506
640
|
|
|
507
641
|
The value to test.
|
|
508
642
|
|
|
509
|
-
|
|
643
|
+
##### failures
|
|
644
|
+
|
|
645
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
510
646
|
|
|
511
647
|
The list of failures to add to.
|
|
512
648
|
|
|
513
|
-
|
|
649
|
+
##### fieldNameResource?
|
|
650
|
+
|
|
651
|
+
`string`
|
|
514
652
|
|
|
515
653
|
Optional i18n resource of the field name to display in the message.
|
|
516
654
|
|
|
@@ -530,23 +668,31 @@ Is the property an object.
|
|
|
530
668
|
|
|
531
669
|
#### Type Parameters
|
|
532
670
|
|
|
533
|
-
• **T** =
|
|
671
|
+
• **T** = \{\}
|
|
534
672
|
|
|
535
673
|
#### Parameters
|
|
536
674
|
|
|
537
|
-
|
|
675
|
+
##### property
|
|
676
|
+
|
|
677
|
+
`string`
|
|
538
678
|
|
|
539
679
|
The name of the property.
|
|
540
680
|
|
|
541
|
-
|
|
681
|
+
##### value
|
|
682
|
+
|
|
683
|
+
`unknown`
|
|
542
684
|
|
|
543
685
|
The value to test.
|
|
544
686
|
|
|
545
|
-
|
|
687
|
+
##### failures
|
|
688
|
+
|
|
689
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
546
690
|
|
|
547
691
|
The list of failures to add to.
|
|
548
692
|
|
|
549
|
-
|
|
693
|
+
##### fieldNameResource?
|
|
694
|
+
|
|
695
|
+
`string`
|
|
550
696
|
|
|
551
697
|
Optional i18n resource of the field name to display in the message.
|
|
552
698
|
|
|
@@ -570,19 +716,27 @@ Is the property an array.
|
|
|
570
716
|
|
|
571
717
|
#### Parameters
|
|
572
718
|
|
|
573
|
-
|
|
719
|
+
##### property
|
|
720
|
+
|
|
721
|
+
`string`
|
|
574
722
|
|
|
575
723
|
The name of the property.
|
|
576
724
|
|
|
577
|
-
|
|
725
|
+
##### value
|
|
726
|
+
|
|
727
|
+
`unknown`
|
|
578
728
|
|
|
579
729
|
The value to test.
|
|
580
730
|
|
|
581
|
-
|
|
731
|
+
##### failures
|
|
732
|
+
|
|
733
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
582
734
|
|
|
583
735
|
The list of failures to add to.
|
|
584
736
|
|
|
585
|
-
|
|
737
|
+
##### fieldNameResource?
|
|
738
|
+
|
|
739
|
+
`string`
|
|
586
740
|
|
|
587
741
|
Optional i18n resource of the field name to display in the message.
|
|
588
742
|
|
|
@@ -606,19 +760,27 @@ Is the property an array with at least one item.
|
|
|
606
760
|
|
|
607
761
|
#### Parameters
|
|
608
762
|
|
|
609
|
-
|
|
763
|
+
##### property
|
|
764
|
+
|
|
765
|
+
`string`
|
|
610
766
|
|
|
611
767
|
The name of the property.
|
|
612
768
|
|
|
613
|
-
|
|
769
|
+
##### value
|
|
770
|
+
|
|
771
|
+
`unknown`
|
|
614
772
|
|
|
615
773
|
The value to test.
|
|
616
774
|
|
|
617
|
-
|
|
775
|
+
##### failures
|
|
776
|
+
|
|
777
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
618
778
|
|
|
619
779
|
The list of failures to add to.
|
|
620
780
|
|
|
621
|
-
|
|
781
|
+
##### fieldNameResource?
|
|
782
|
+
|
|
783
|
+
`string`
|
|
622
784
|
|
|
623
785
|
Optional i18n resource of the field name to display in the message.
|
|
624
786
|
|
|
@@ -642,23 +804,33 @@ Is the property one of a list of items.
|
|
|
642
804
|
|
|
643
805
|
#### Parameters
|
|
644
806
|
|
|
645
|
-
|
|
807
|
+
##### property
|
|
808
|
+
|
|
809
|
+
`string`
|
|
646
810
|
|
|
647
811
|
The name of the property.
|
|
648
812
|
|
|
649
|
-
|
|
813
|
+
##### value
|
|
814
|
+
|
|
815
|
+
`T`
|
|
650
816
|
|
|
651
817
|
The value to test.
|
|
652
818
|
|
|
653
|
-
|
|
819
|
+
##### options
|
|
820
|
+
|
|
821
|
+
`T`[]
|
|
654
822
|
|
|
655
823
|
The options the value must be one of.
|
|
656
824
|
|
|
657
|
-
|
|
825
|
+
##### failures
|
|
826
|
+
|
|
827
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
658
828
|
|
|
659
829
|
The list of failures to add to.
|
|
660
830
|
|
|
661
|
-
|
|
831
|
+
##### fieldNameResource?
|
|
832
|
+
|
|
833
|
+
`string`
|
|
662
834
|
|
|
663
835
|
Optional i18n resource of the field name to display in the message.
|
|
664
836
|
|
|
@@ -678,19 +850,27 @@ Is the property a Uint8Array.
|
|
|
678
850
|
|
|
679
851
|
#### Parameters
|
|
680
852
|
|
|
681
|
-
|
|
853
|
+
##### property
|
|
854
|
+
|
|
855
|
+
`string`
|
|
682
856
|
|
|
683
857
|
The name of the property.
|
|
684
858
|
|
|
685
|
-
|
|
859
|
+
##### value
|
|
860
|
+
|
|
861
|
+
`unknown`
|
|
686
862
|
|
|
687
863
|
The value to test.
|
|
688
864
|
|
|
689
|
-
|
|
865
|
+
##### failures
|
|
866
|
+
|
|
867
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
690
868
|
|
|
691
869
|
The list of failures to add to.
|
|
692
870
|
|
|
693
|
-
|
|
871
|
+
##### fieldNameResource?
|
|
872
|
+
|
|
873
|
+
`string`
|
|
694
874
|
|
|
695
875
|
Optional i18n resource of the field name to display in the message.
|
|
696
876
|
|
|
@@ -710,19 +890,27 @@ Is the property valid JSON.
|
|
|
710
890
|
|
|
711
891
|
#### Parameters
|
|
712
892
|
|
|
713
|
-
|
|
893
|
+
##### property
|
|
894
|
+
|
|
895
|
+
`string`
|
|
714
896
|
|
|
715
897
|
The name of the property.
|
|
716
898
|
|
|
717
|
-
|
|
899
|
+
##### value
|
|
900
|
+
|
|
901
|
+
`unknown`
|
|
718
902
|
|
|
719
903
|
The value to test.
|
|
720
904
|
|
|
721
|
-
|
|
905
|
+
##### failures
|
|
906
|
+
|
|
907
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
722
908
|
|
|
723
909
|
The list of failures to add to.
|
|
724
910
|
|
|
725
|
-
|
|
911
|
+
##### fieldNameResource?
|
|
912
|
+
|
|
913
|
+
`string`
|
|
726
914
|
|
|
727
915
|
Optional i18n resource of the field name to display in the message.
|
|
728
916
|
|
|
@@ -742,19 +930,27 @@ Is the property a string in e-mail format.
|
|
|
742
930
|
|
|
743
931
|
#### Parameters
|
|
744
932
|
|
|
745
|
-
|
|
933
|
+
##### property
|
|
934
|
+
|
|
935
|
+
`string`
|
|
746
936
|
|
|
747
937
|
The name of the property.
|
|
748
938
|
|
|
749
|
-
|
|
939
|
+
##### value
|
|
940
|
+
|
|
941
|
+
`unknown`
|
|
750
942
|
|
|
751
943
|
The value to test.
|
|
752
944
|
|
|
753
|
-
|
|
945
|
+
##### failures
|
|
946
|
+
|
|
947
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
754
948
|
|
|
755
949
|
The list of failures to add to.
|
|
756
950
|
|
|
757
|
-
|
|
951
|
+
##### fieldNameResource?
|
|
952
|
+
|
|
953
|
+
`string`
|
|
758
954
|
|
|
759
955
|
Optional i18n resource of the field name to display in the message.
|
|
760
956
|
|
|
@@ -774,15 +970,21 @@ Throw the validation failures as a ValidationError.
|
|
|
774
970
|
|
|
775
971
|
#### Parameters
|
|
776
972
|
|
|
777
|
-
|
|
973
|
+
##### source
|
|
974
|
+
|
|
975
|
+
`string`
|
|
778
976
|
|
|
779
977
|
The source of the error.
|
|
780
978
|
|
|
781
|
-
|
|
979
|
+
##### objectName
|
|
980
|
+
|
|
981
|
+
`string`
|
|
782
982
|
|
|
783
983
|
The object that was being validated.
|
|
784
984
|
|
|
785
|
-
|
|
985
|
+
##### failures
|
|
986
|
+
|
|
987
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
786
988
|
|
|
787
989
|
The validation failures.
|
|
788
990
|
|
|
@@ -804,15 +1006,19 @@ Map a list of failures to their properties in a map.
|
|
|
804
1006
|
|
|
805
1007
|
#### Parameters
|
|
806
1008
|
|
|
807
|
-
|
|
1009
|
+
##### failures
|
|
1010
|
+
|
|
1011
|
+
[`IValidationFailure`](../interfaces/IValidationFailure.md)[]
|
|
808
1012
|
|
|
809
1013
|
The validation failures to combine into the map for the properties.
|
|
810
1014
|
|
|
811
|
-
|
|
1015
|
+
##### propertyMap
|
|
812
1016
|
|
|
813
1017
|
The map to add the failures to.
|
|
814
1018
|
|
|
815
|
-
|
|
1019
|
+
##### clearMap
|
|
1020
|
+
|
|
1021
|
+
`boolean` = `true`
|
|
816
1022
|
|
|
817
1023
|
Should the map be cleared before adding the failures.
|
|
818
1024
|
|