@dolanske/v-valid 2.1.0 → 2.1.1
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/README.md +3 -3
- package/dist/v-valid.d.ts +97 -81
- package/dist/v-valid.js +520 -508
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,10 +4,10 @@ You know what they say, you can not trust a thief or a murderer. You know who yo
|
|
|
4
4
|
|
|
5
5
|
## Example + Setup
|
|
6
6
|
|
|
7
|
-
1.
|
|
7
|
+
1. Install the package via npm
|
|
8
8
|
|
|
9
9
|
```cmd
|
|
10
|
-
npm i
|
|
10
|
+
npm i @dolanske/v-valid
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
2. Set up your component
|
|
@@ -494,7 +494,7 @@ const arrAndMinLen = createRuleArg<{ length: number }> (
|
|
|
494
494
|
const checkPassword = createRule(
|
|
495
495
|
(password) =>
|
|
496
496
|
new Promise((resolve) => {
|
|
497
|
-
const result =
|
|
497
|
+
const result = await someApiCall(password)
|
|
498
498
|
resolve(result)
|
|
499
499
|
}),
|
|
500
500
|
'Incorrect password. Please try again.'
|
package/dist/v-valid.d.ts
CHANGED
|
@@ -115,6 +115,16 @@ declare type _DeepKeys<T> = T extends object ? ({
|
|
|
115
115
|
[K in (string | number) & keyof T]: `${(`.${K}` | (`${K}` extends `${number}` ? `[${K}]` : never))}${'' | _DeepKeys<FixArr<T[K]>>}`;
|
|
116
116
|
}[(string | number) & keyof T]) : never;
|
|
117
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Type safe helper to generating rules from form objects. Also allows array rule definition
|
|
120
|
+
*
|
|
121
|
+
* @param rules
|
|
122
|
+
* @returns Rules to be used within the composable
|
|
123
|
+
*/
|
|
124
|
+
export declare function defineRules<F>(rules: DefineRuleType<F>): DefineRuleType<F>;
|
|
125
|
+
|
|
126
|
+
declare type DefineRuleType<T> = ReplacePrimitivesOptional<T, Record<string, Rule> | Array<Rule>>;
|
|
127
|
+
|
|
118
128
|
declare type DefLabel = string | ((value: any) => string);
|
|
119
129
|
|
|
120
130
|
/**
|
|
@@ -277,12 +287,18 @@ declare type ReplacePrimitives<T, ReplaceWith> = T extends Record<string, unknow
|
|
|
277
287
|
[K in keyof T]: ReplacePrimitives<T[K], ReplaceWith>;
|
|
278
288
|
} : ReplaceWith;
|
|
279
289
|
|
|
290
|
+
declare type ReplacePrimitivesOptional<T, ReplaceWith> = T extends Record<string, unknown> ? {
|
|
291
|
+
[K in keyof T]?: ReplacePrimitivesOptional<T[K], ReplaceWith>;
|
|
292
|
+
} : ReplaceWith;
|
|
293
|
+
|
|
280
294
|
/**
|
|
281
295
|
* @Rule Input must not be empty, null or undefined.
|
|
282
296
|
* If input is number with value 0, it will return true as value was provided
|
|
283
297
|
*/
|
|
284
298
|
export declare const required: ValidationRuleObject;
|
|
285
299
|
|
|
300
|
+
declare type Rule = ValidationRule | ValidationRuleObject;
|
|
301
|
+
|
|
286
302
|
declare type RuleParams = Record<string, any>;
|
|
287
303
|
|
|
288
304
|
/**
|
|
@@ -375,84 +391,84 @@ declare interface ValidationRuleObject extends ValidationRule {
|
|
|
375
391
|
}
|
|
376
392
|
|
|
377
393
|
export { }
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
declare namespace $and {
|
|
381
|
-
var skip: (..._args: any[]) => ValidationRule;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
declare namespace $
|
|
386
|
-
var skip:
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
declare namespace $
|
|
391
|
-
var skip: ValidationRule;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
declare namespace minLength {
|
|
396
|
-
var skip: (..._args: any[]) => ValidationRule;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
declare namespace
|
|
401
|
-
var skip: (..._args: any[]) => ValidationRule;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
declare namespace
|
|
406
|
-
var skip: (..._args: any[]) => ValidationRule;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
declare namespace match {
|
|
411
|
-
var skip: (..._args: any[]) => ValidationRule;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
declare namespace between {
|
|
416
|
-
var skip: (..._args: any[]) => import("../types").ValidationRule;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
declare namespace
|
|
421
|
-
var skip: (..._args: any[]) => ValidationRule;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
declare namespace
|
|
426
|
-
var skip: (..._args: any[]) => ValidationRule;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
declare namespace
|
|
431
|
-
var skip: (..._args: any[]) => ValidationRule;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
declare namespace
|
|
436
|
-
var skip: (..._args: any[]) =>
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
declare namespace
|
|
441
|
-
var skip: (..._args: any[]) =>
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
declare namespace
|
|
446
|
-
var skip: (..._args: any[]) => ValidationRule;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
declare namespace
|
|
451
|
-
var skip: (..._args: any[]) => ValidationRule;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
declare namespace password {
|
|
456
|
-
var skip: (..._args: any[]) => ValidationRule;
|
|
457
|
-
}
|
|
458
|
-
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
declare namespace $and {
|
|
397
|
+
var skip: (..._args: any[]) => ValidationRule;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
declare namespace $not {
|
|
402
|
+
var skip: ValidationRule;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
declare namespace $or {
|
|
407
|
+
var skip: (..._args: any[]) => ValidationRule;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
declare namespace minLength {
|
|
412
|
+
var skip: (..._args: any[]) => ValidationRule;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
declare namespace maxLength {
|
|
417
|
+
var skip: (..._args: any[]) => ValidationRule;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
declare namespace sameAs {
|
|
422
|
+
var skip: (..._args: any[]) => ValidationRule;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
declare namespace match {
|
|
427
|
+
var skip: (..._args: any[]) => ValidationRule;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
declare namespace between {
|
|
432
|
+
var skip: (..._args: any[]) => import("../types").ValidationRule;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
declare namespace maxValue {
|
|
437
|
+
var skip: (..._args: any[]) => ValidationRule;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
declare namespace minValue {
|
|
442
|
+
var skip: (..._args: any[]) => ValidationRule;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
declare namespace maxLenNoSpace {
|
|
447
|
+
var skip: (..._args: any[]) => ValidationRule;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
declare namespace minLenNoSpace {
|
|
452
|
+
var skip: (..._args: any[]) => ValidationRule;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
declare namespace contains {
|
|
457
|
+
var skip: (..._args: any[]) => ValidationRule;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
declare namespace endsWith {
|
|
462
|
+
var skip: (..._args: any[]) => import("../../types").ValidationRule;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
declare namespace startsWith {
|
|
467
|
+
var skip: (..._args: any[]) => import("../../types").ValidationRule;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
declare namespace password {
|
|
472
|
+
var skip: (..._args: any[]) => ValidationRule;
|
|
473
|
+
}
|
|
474
|
+
|
package/dist/v-valid.js
CHANGED
|
@@ -1,508 +1,520 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
function y(e) {
|
|
3
|
-
return e.trim().replace(" ", ".");
|
|
4
|
-
}
|
|
5
|
-
async function
|
|
6
|
-
for (const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
function
|
|
18
|
-
return
|
|
19
|
-
}
|
|
20
|
-
function
|
|
21
|
-
return typeof e == "
|
|
22
|
-
}
|
|
23
|
-
function
|
|
24
|
-
return e instanceof
|
|
25
|
-
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
28
|
-
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
function
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
function
|
|
36
|
-
return e instanceof
|
|
37
|
-
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
40
|
-
}
|
|
41
|
-
function
|
|
42
|
-
return e instanceof
|
|
43
|
-
}
|
|
44
|
-
function
|
|
45
|
-
return e
|
|
46
|
-
}
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (u
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
errors
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
return
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
function
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
return
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
function ee(...e) {
|
|
214
|
-
return {
|
|
215
|
-
name: "
|
|
216
|
-
__skip: !1,
|
|
217
|
-
validate: (t) => N(t, e, "
|
|
218
|
-
label() {
|
|
219
|
-
return "Value must pass
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
ee.skip =
|
|
224
|
-
function te(...e) {
|
|
225
|
-
return {
|
|
226
|
-
name: "
|
|
227
|
-
__skip: !1,
|
|
228
|
-
validate: (t) => N(t, e, "
|
|
229
|
-
label() {
|
|
230
|
-
return "Value must pass
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
te.skip =
|
|
235
|
-
function
|
|
236
|
-
return
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
function
|
|
247
|
-
return
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
return {
|
|
287
|
-
name: "
|
|
288
|
-
__skip: !1,
|
|
289
|
-
validate: (n) =>
|
|
290
|
-
/* c8 ignore next 3 */
|
|
291
|
-
label: () => "
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
fe.skip =
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
name: "
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
ke
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
name: "
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
1
|
+
import { ref as z, reactive as Q, watch as E, isRef as A, unref as f } from "vue-demi";
|
|
2
|
+
function y(e) {
|
|
3
|
+
return e.trim().replace(" ", ".");
|
|
4
|
+
}
|
|
5
|
+
async function h(e, t, n = "") {
|
|
6
|
+
for (const r in e) {
|
|
7
|
+
const i = `${n} ${r}`.trim();
|
|
8
|
+
p(e[r]) && !(e[r] instanceof Date) ? await h(e[r], t, i) : await t(r, e[r], i);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function X(e, t, n = "") {
|
|
12
|
+
for (const r in e) {
|
|
13
|
+
const i = `${n} ${r}`.trim();
|
|
14
|
+
p(e[r]) && !(e[r] instanceof Date) ? h(e[r], t, i) : t(r, e[r], i);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function u(e) {
|
|
18
|
+
return e == null;
|
|
19
|
+
}
|
|
20
|
+
function M(e) {
|
|
21
|
+
return typeof e == "boolean";
|
|
22
|
+
}
|
|
23
|
+
function O(e) {
|
|
24
|
+
return typeof e == "function" && e instanceof Function;
|
|
25
|
+
}
|
|
26
|
+
function _(e) {
|
|
27
|
+
return typeof e == "number" || e instanceof Number;
|
|
28
|
+
}
|
|
29
|
+
function $(e) {
|
|
30
|
+
return e instanceof Date;
|
|
31
|
+
}
|
|
32
|
+
function V(e) {
|
|
33
|
+
return Array.isArray(e);
|
|
34
|
+
}
|
|
35
|
+
function Y(e) {
|
|
36
|
+
return typeof e == "string" || e instanceof String;
|
|
37
|
+
}
|
|
38
|
+
function Z(e) {
|
|
39
|
+
return u(e) ? !0 : "length" in e ? e.length <= 0 : "size" in e ? e.size <= 0 : p(e) ? Object.keys(e).length <= 0 : !0;
|
|
40
|
+
}
|
|
41
|
+
function w(e) {
|
|
42
|
+
return e instanceof Map;
|
|
43
|
+
}
|
|
44
|
+
function p(e) {
|
|
45
|
+
return typeof e == "object" && !V(e) && e !== null && !O(e);
|
|
46
|
+
}
|
|
47
|
+
function D(e) {
|
|
48
|
+
return e instanceof Set;
|
|
49
|
+
}
|
|
50
|
+
function I(e) {
|
|
51
|
+
return e instanceof Symbol;
|
|
52
|
+
}
|
|
53
|
+
function c(e, t, n) {
|
|
54
|
+
if (u(e) || !p(e))
|
|
55
|
+
return;
|
|
56
|
+
t = y(t.trim());
|
|
57
|
+
const r = t.split(".");
|
|
58
|
+
let i = e;
|
|
59
|
+
const a = r.length;
|
|
60
|
+
if (a > 1)
|
|
61
|
+
for (let o = 0; o < a; o++) {
|
|
62
|
+
const l = r[o];
|
|
63
|
+
if (l.length === 0)
|
|
64
|
+
continue;
|
|
65
|
+
const d = Reflect.get(i, l);
|
|
66
|
+
if (p(d))
|
|
67
|
+
i = d;
|
|
68
|
+
else if (o === a - 1) {
|
|
69
|
+
Reflect.set(i, l, n);
|
|
70
|
+
break;
|
|
71
|
+
} else
|
|
72
|
+
d === void 0 && (Reflect.set(i, l, {}), i = Reflect.get(i, l));
|
|
73
|
+
}
|
|
74
|
+
else
|
|
75
|
+
Reflect.set(i, r[0], n);
|
|
76
|
+
}
|
|
77
|
+
function x(e, t) {
|
|
78
|
+
if (u(e) || !p(e))
|
|
79
|
+
return;
|
|
80
|
+
t = y(t.trim());
|
|
81
|
+
const n = t.split(".");
|
|
82
|
+
let r = e;
|
|
83
|
+
for (const i of n)
|
|
84
|
+
i.length !== 0 && (r = Reflect.get(r, i));
|
|
85
|
+
return r;
|
|
86
|
+
}
|
|
87
|
+
function q() {
|
|
88
|
+
return { id: null, value: null, invalid: !1, errors: {} };
|
|
89
|
+
}
|
|
90
|
+
function Le(e, t, n = {}) {
|
|
91
|
+
const { proactive: r = !1, autoclear: i = !1 } = n, a = z(!1), o = z(!1), l = z({}), d = Q({
|
|
92
|
+
didValidate: !1
|
|
93
|
+
});
|
|
94
|
+
i ? E(e, () => {
|
|
95
|
+
d.didValidate && b();
|
|
96
|
+
}, { deep: !0 }) : r && (E(e, () => R(), { deep: !0 }), A(t) && E(t, () => R(), { deep: !0 })), b();
|
|
97
|
+
function C() {
|
|
98
|
+
a.value = !1, o.value = !1, h(e, (k, g, S) => {
|
|
99
|
+
c(l.value, y(S), q());
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function b() {
|
|
103
|
+
d.didValidate = !1, C();
|
|
104
|
+
}
|
|
105
|
+
async function R(...k) {
|
|
106
|
+
return b(), o.value = !0, new Promise(async (g, S) => {
|
|
107
|
+
await h(e, async (j, L, m) => {
|
|
108
|
+
m = y(m), c(l.value, m, q());
|
|
109
|
+
const F = f(t), P = x(F, m);
|
|
110
|
+
if (!P)
|
|
111
|
+
return Promise.resolve();
|
|
112
|
+
for (const [T, B] of Object.entries(P)) {
|
|
113
|
+
if (k.length > 0 && !k.includes(T))
|
|
114
|
+
continue;
|
|
115
|
+
const { label: K, validate: G, __skip: H } = B;
|
|
116
|
+
if (H)
|
|
117
|
+
continue;
|
|
118
|
+
const J = await G(L);
|
|
119
|
+
c(l.value, `${m}.id`, j), c(l.value, `${m}.value`, L), J || (a.value = !0, c(l.value, `${m}.invalid`, !0), c(l.value, `${m}.errors.${T}`, K(L)));
|
|
120
|
+
}
|
|
121
|
+
return Promise.resolve();
|
|
122
|
+
}), o.value = !1, d.didValidate = !0, a.value ? S(l.value) : g(l.value);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function U(k, g) {
|
|
126
|
+
c(l.value, `${k}.errors.${g.key}`, g.message), c(l.value, `${k}.invalid`, !0);
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
reset: b,
|
|
130
|
+
validate: R,
|
|
131
|
+
addError: U,
|
|
132
|
+
errors: l,
|
|
133
|
+
anyError: a,
|
|
134
|
+
pending: o
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
const s = function(...e) {
|
|
138
|
+
return {
|
|
139
|
+
name: "skipped-rule",
|
|
140
|
+
__skip: !0,
|
|
141
|
+
validate: () => !0,
|
|
142
|
+
label: () => "test"
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
function N(e, t, n) {
|
|
146
|
+
return new Promise(async (r) => {
|
|
147
|
+
const i = [];
|
|
148
|
+
for (const a of t) {
|
|
149
|
+
if (!a.validate)
|
|
150
|
+
throw new Error("Rule is missing a validator function");
|
|
151
|
+
const o = await a.validate(e);
|
|
152
|
+
i.push(o);
|
|
153
|
+
}
|
|
154
|
+
switch (n) {
|
|
155
|
+
case "every": {
|
|
156
|
+
r(i.every((a) => a));
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
case "some": {
|
|
160
|
+
r(i.some((a) => a));
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
case "none": {
|
|
164
|
+
r(!i.every((a) => a));
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
const W = "Value does not satisfy the validation rule.";
|
|
171
|
+
function ze(e, t, n) {
|
|
172
|
+
return {
|
|
173
|
+
skip: s,
|
|
174
|
+
name: n ?? "custom-object-rule",
|
|
175
|
+
__skip: !1,
|
|
176
|
+
validate: (r) => e(r),
|
|
177
|
+
label: (r) => u(t) ? W : typeof t == "string" ? t : t(r)
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
function Ee(e, t, n) {
|
|
181
|
+
const r = (i) => ({
|
|
182
|
+
// the value from validate is the actual value we are testing against
|
|
183
|
+
// injected during validation
|
|
184
|
+
__skip: !1,
|
|
185
|
+
name: n ?? "custom-param-rule",
|
|
186
|
+
validate: (a) => e(a, i),
|
|
187
|
+
label: (a) => u(t) ? W : typeof t == "string" ? t : t(a, i)
|
|
188
|
+
});
|
|
189
|
+
return r.skip = s, r;
|
|
190
|
+
}
|
|
191
|
+
function Ae(e) {
|
|
192
|
+
return X(e, (t, n, r) => {
|
|
193
|
+
V(n) && c(e, r, n.reduce((i, a, o) => (a.name in i ? Reflect.set(i, a.name + o, a) : Reflect.set(i, a.name, a), i), {}));
|
|
194
|
+
}), e;
|
|
195
|
+
}
|
|
196
|
+
function Oe(e, t) {
|
|
197
|
+
const { validate: n, __skip: r, name: i } = t;
|
|
198
|
+
if (u(n))
|
|
199
|
+
throw new Error("[withLabel] Missing validator function");
|
|
200
|
+
return {
|
|
201
|
+
name: i,
|
|
202
|
+
__skip: r,
|
|
203
|
+
validate: n,
|
|
204
|
+
label: (a) => typeof e == "string" ? e : e(a)
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
function Ne(e, t) {
|
|
208
|
+
return M(e) ? e ? t : s() : A(e) ? e.value ? t : s() : O(e) ? e() ? t : s() : e.then((n) => n ? t : s());
|
|
209
|
+
}
|
|
210
|
+
function Pe(e, t) {
|
|
211
|
+
return M(e) ? e ? s() : t : A(e) ? e.value ? s() : t : O(e) ? e() ? s() : t : e.then((n) => n ? s() : t);
|
|
212
|
+
}
|
|
213
|
+
function ee(...e) {
|
|
214
|
+
return {
|
|
215
|
+
name: "and-validator",
|
|
216
|
+
__skip: !1,
|
|
217
|
+
validate: (t) => N(t, e, "every"),
|
|
218
|
+
label() {
|
|
219
|
+
return "Value must pass all the required checks";
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
ee.skip = s;
|
|
224
|
+
function te(...e) {
|
|
225
|
+
return {
|
|
226
|
+
name: "or-validator",
|
|
227
|
+
__skip: !1,
|
|
228
|
+
validate: (t) => N(t, e, "some"),
|
|
229
|
+
label() {
|
|
230
|
+
return "Value must pass some of the checks";
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
te.skip = s;
|
|
235
|
+
function ne(...e) {
|
|
236
|
+
return {
|
|
237
|
+
name: "not-validator",
|
|
238
|
+
__skip: !1,
|
|
239
|
+
validate: (t) => N(t, e, "none"),
|
|
240
|
+
label() {
|
|
241
|
+
return "Value must pass none of the checks";
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
ne.skip = s();
|
|
246
|
+
function Te(e, t) {
|
|
247
|
+
return e.validate(t);
|
|
248
|
+
}
|
|
249
|
+
const qe = {
|
|
250
|
+
__skip: !1,
|
|
251
|
+
name: "required",
|
|
252
|
+
skip: s,
|
|
253
|
+
validate: (e) => u(e) || e === "null" || e === "undefined" ? !1 : typeof e == "string" ? e.length > 0 : typeof e == "number" ? !0 : !Z(e),
|
|
254
|
+
/* c8 ignore next 3 */
|
|
255
|
+
label: () => "Value is required"
|
|
256
|
+
};
|
|
257
|
+
function re(e) {
|
|
258
|
+
return {
|
|
259
|
+
name: "minLength",
|
|
260
|
+
__skip: !1,
|
|
261
|
+
validate: (t) => u(t) ? !1 : (e = f(e), D(t) || w(t) ? t.size >= e : p(t) ? Object.keys(t).length >= e : t != null && t.length ? t.length >= e : !1),
|
|
262
|
+
/* c8 ignore next 3 */
|
|
263
|
+
label: () => `Value must be greater or equal to ${f(e)}`
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
re.skip = s;
|
|
267
|
+
function se(e) {
|
|
268
|
+
return {
|
|
269
|
+
name: "maxLength",
|
|
270
|
+
__skip: !1,
|
|
271
|
+
validate: (t) => u(t) ? !1 : (e = f(e), D(t) || w(t) ? t.size <= e : p(t) ? Object.keys(t).length <= e : t.length <= e),
|
|
272
|
+
/* c8 ignore next 3 */
|
|
273
|
+
label: () => `Value must be lesser or equal to ${f(e)}`
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
se.skip = s;
|
|
277
|
+
const ie = /^([\w!#$%&'*+/=?^`{|}~-]+(?:\.[\w!#$%&'*+/=?^`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)$/i, ae = /[^a-z0-9]/i, v = /\S/g, Me = {
|
|
278
|
+
__skip: !1,
|
|
279
|
+
name: "email",
|
|
280
|
+
skip: s,
|
|
281
|
+
validate: (e) => u(e) ? !1 : ie.test(e),
|
|
282
|
+
/* c8 ignore next 3 */
|
|
283
|
+
label: () => "Value must be in a valid email format"
|
|
284
|
+
};
|
|
285
|
+
function fe(e, t = !1) {
|
|
286
|
+
return {
|
|
287
|
+
name: "sameAs",
|
|
288
|
+
__skip: !1,
|
|
289
|
+
validate: (n) => (e = f(e), t ? f(n) == f(e) : f(n) === f(e)),
|
|
290
|
+
/* c8 ignore next 3 */
|
|
291
|
+
label: () => "Values must be matching"
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
fe.skip = s;
|
|
295
|
+
function ue(e) {
|
|
296
|
+
const t = typeof e == "string" ? new RegExp(e) : e;
|
|
297
|
+
return {
|
|
298
|
+
name: "match",
|
|
299
|
+
__skip: !1,
|
|
300
|
+
validate: (n) => u(n) ? !1 : t.test(n),
|
|
301
|
+
/* c8 ignore next 3 */
|
|
302
|
+
label: () => "Value must match the provided rule."
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
ue.skip = s;
|
|
306
|
+
const We = {
|
|
307
|
+
__skip: !1,
|
|
308
|
+
name: "url",
|
|
309
|
+
skip: s,
|
|
310
|
+
validate: (e) => {
|
|
311
|
+
if (u(e))
|
|
312
|
+
return !1;
|
|
313
|
+
try {
|
|
314
|
+
return new URL(e) instanceof URL;
|
|
315
|
+
} catch {
|
|
316
|
+
return !1;
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
label: () => "Value must be a valid URL"
|
|
320
|
+
}, le = {
|
|
321
|
+
__skip: !1,
|
|
322
|
+
name: "str",
|
|
323
|
+
skip: s,
|
|
324
|
+
validate: (e) => u(e) ? !1 : Y(e),
|
|
325
|
+
label: ({ value: e }) => `Value <${typeof e}> must be a string`
|
|
326
|
+
}, oe = {
|
|
327
|
+
name: "num",
|
|
328
|
+
__skip: !1,
|
|
329
|
+
skip: s,
|
|
330
|
+
validate: (e) => u(e) ? !1 : _(e),
|
|
331
|
+
label: ({ value: e }) => `Value <${typeof e}> must be a number`
|
|
332
|
+
}, ce = {
|
|
333
|
+
name: "arr",
|
|
334
|
+
__skip: !1,
|
|
335
|
+
skip: s,
|
|
336
|
+
validate: (e) => u(e) ? !1 : V(e),
|
|
337
|
+
label: ({ value: e }) => `Value <${typeof e}> must be an Array`
|
|
338
|
+
}, pe = {
|
|
339
|
+
name: "obj",
|
|
340
|
+
__skip: !1,
|
|
341
|
+
skip: s,
|
|
342
|
+
validate: (e) => u(e) || V(e) || D(e) || w(e) ? !1 : p(e),
|
|
343
|
+
label: ({ value: e }) => `Value <${typeof e}> must be an Object`
|
|
344
|
+
}, me = {
|
|
345
|
+
name: "set",
|
|
346
|
+
__skip: !1,
|
|
347
|
+
skip: s,
|
|
348
|
+
validate: (e) => u(e) ? !1 : D(e),
|
|
349
|
+
label: ({ value: e }) => `Value <${typeof e}> must be a Set`
|
|
350
|
+
}, de = {
|
|
351
|
+
name: "map",
|
|
352
|
+
__skip: !1,
|
|
353
|
+
skip: s,
|
|
354
|
+
validate: (e) => u(e) ? !1 : w(e),
|
|
355
|
+
label: ({ value: e }) => `Value <${typeof e}> must be a Map`
|
|
356
|
+
}, ke = {
|
|
357
|
+
name: "date",
|
|
358
|
+
__skip: !1,
|
|
359
|
+
skip: s,
|
|
360
|
+
validate: (e) => {
|
|
361
|
+
if (u(e) || e == "Invalid Date")
|
|
362
|
+
return !1;
|
|
363
|
+
if ($(e) && e.getTime())
|
|
364
|
+
return !0;
|
|
365
|
+
const t = new Date(e);
|
|
366
|
+
return $(t);
|
|
367
|
+
},
|
|
368
|
+
label: ({ value: e }) => `Value <${typeof e}> must be a valid Date object`
|
|
369
|
+
}, ge = {
|
|
370
|
+
name: "symbol",
|
|
371
|
+
__skip: !1,
|
|
372
|
+
skip: s,
|
|
373
|
+
validate: (e) => u(e) ? !1 : I(e),
|
|
374
|
+
label: ({ value: e }) => `Value <${typeof e}> must be a Symbol`
|
|
375
|
+
}, _e = {
|
|
376
|
+
str: le,
|
|
377
|
+
num: oe,
|
|
378
|
+
arr: ce,
|
|
379
|
+
obj: pe,
|
|
380
|
+
set: me,
|
|
381
|
+
map: de,
|
|
382
|
+
date: ke,
|
|
383
|
+
symbol: ge
|
|
384
|
+
};
|
|
385
|
+
function be(e, t) {
|
|
386
|
+
return {
|
|
387
|
+
__skip: !1,
|
|
388
|
+
name: "between",
|
|
389
|
+
validate: (n) => u(n) ? !1 : (e = f(e), t = f(t), _e.date.validate(n) && (e = e instanceof Date ? e.getTime() : new Date(e).getTime(), t = t instanceof Date ? t.getTime() : new Date(t).getTime(), n = n instanceof Date ? n.getTime() : new Date(n).getTime()), n >= e && n <= t),
|
|
390
|
+
label: () => `Value must be between ${f(e)} and ${f(t)}`
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
be.skip = s;
|
|
394
|
+
function ye(e) {
|
|
395
|
+
return {
|
|
396
|
+
name: "minValue",
|
|
397
|
+
__skip: !1,
|
|
398
|
+
validate: (t) => u(t) ? !1 : (e = f(e), _(t) && _(e) ? t >= e : $(t) ? new Date(t) >= new Date(e) : !1),
|
|
399
|
+
/* c8 ignore next 3 */
|
|
400
|
+
label: () => `Minimum allowed value is ${f(e)}`
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
ye.skip = s;
|
|
404
|
+
function he(e) {
|
|
405
|
+
return {
|
|
406
|
+
name: "maxValue",
|
|
407
|
+
__skip: !1,
|
|
408
|
+
validate: (t) => u(t) ? !1 : (e = f(e), _(t) && _(e) ? t <= e : $(t) ? new Date(t) <= new Date(e) : !1),
|
|
409
|
+
/* c8 ignore next 3 */
|
|
410
|
+
label: () => `Value must be shorter or equal to ${f(e)}`
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
he.skip = s;
|
|
414
|
+
function $e(e) {
|
|
415
|
+
return {
|
|
416
|
+
__skip: !1,
|
|
417
|
+
name: "maxLenNoSpace",
|
|
418
|
+
validate: (t) => {
|
|
419
|
+
if (u(t) || typeof t != "string")
|
|
420
|
+
return !1;
|
|
421
|
+
e = f(e);
|
|
422
|
+
const n = t.match(v);
|
|
423
|
+
return n ? n.length <= e : !1;
|
|
424
|
+
},
|
|
425
|
+
label: (t) => typeof t != "string" ? "Value must be a string and " : `Value must have maximal lenght of ${f(e)} excluding spaces`
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
$e.skip = s;
|
|
429
|
+
function Ve(e) {
|
|
430
|
+
return {
|
|
431
|
+
name: "minLenNoSpace",
|
|
432
|
+
__skip: !1,
|
|
433
|
+
validate: (t) => {
|
|
434
|
+
if (u(t) || typeof t != "string")
|
|
435
|
+
return !1;
|
|
436
|
+
e = f(e);
|
|
437
|
+
const n = t.match(v);
|
|
438
|
+
return n ? n.length >= e : !1;
|
|
439
|
+
},
|
|
440
|
+
/* c8 ignore next 3 */
|
|
441
|
+
label: () => `Value must have minimal lenght of ${f(e)} excluding spaces`
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
Ve.skip = s;
|
|
445
|
+
const ve = {
|
|
446
|
+
__skip: !1,
|
|
447
|
+
name: "hasSpecialChars",
|
|
448
|
+
skip: s,
|
|
449
|
+
validate: (e) => u(e) ? !1 : !ae.test(e),
|
|
450
|
+
label: (e) => typeof e != "string" ? "Value must be a string and contain no special characters" : "Value must not contain any special characters"
|
|
451
|
+
};
|
|
452
|
+
function we(e, t = !1) {
|
|
453
|
+
return {
|
|
454
|
+
__skip: !1,
|
|
455
|
+
name: "contains",
|
|
456
|
+
validate: (n) => u(n) || typeof n != "string" ? !1 : (typeof e == "string" && (e = t ? [e] : e.trim().split(/\s+/)), e.every((r) => n.toLowerCase().includes(r.toLowerCase()))),
|
|
457
|
+
label: (n) => {
|
|
458
|
+
e = f(e);
|
|
459
|
+
const r = typeof e == "string" ? e : e.join(", ");
|
|
460
|
+
return typeof n != "string" ? `Value must be a string and contain <${r}>` : `Value must contain <${r}>`;
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
we.skip = s;
|
|
465
|
+
function De(e, t) {
|
|
466
|
+
return {
|
|
467
|
+
__skip: !1,
|
|
468
|
+
name: "startsWith",
|
|
469
|
+
validate: (n) => (e = f(e), !n || typeof n != "string" ? !1 : n.startsWith(e, t)),
|
|
470
|
+
label: (n) => typeof n != "string" ? `Value must be a string and start with '${f(e)}'` : `Value must start with '${f(e)}'`
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
De.skip = s;
|
|
474
|
+
function Re(e, t) {
|
|
475
|
+
return {
|
|
476
|
+
__skip: !1,
|
|
477
|
+
name: "endsWith",
|
|
478
|
+
validate: (n) => (e = f(e), !n || typeof n != "string" ? !1 : n.endsWith(e, t)),
|
|
479
|
+
label: (n) => typeof n != "string" ? `Value must be a string and end with '${f(e)}'` : `Value must end with '${f(e)}'`
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
Re.skip = s;
|
|
483
|
+
export {
|
|
484
|
+
ee as $and,
|
|
485
|
+
ne as $not,
|
|
486
|
+
te as $or,
|
|
487
|
+
Te as $test,
|
|
488
|
+
Ne as $validateIf,
|
|
489
|
+
Pe as $validateIfNot,
|
|
490
|
+
Oe as $withLabel,
|
|
491
|
+
be as between,
|
|
492
|
+
we as contains,
|
|
493
|
+
ze as createRule,
|
|
494
|
+
Ee as createRuleArg,
|
|
495
|
+
Ae as defineRules,
|
|
496
|
+
Me as email,
|
|
497
|
+
Re as endsWith,
|
|
498
|
+
ve as hasSpecialChars,
|
|
499
|
+
ce as isArr,
|
|
500
|
+
ke as isDate,
|
|
501
|
+
de as isMap,
|
|
502
|
+
oe as isNum,
|
|
503
|
+
pe as isObj,
|
|
504
|
+
me as isSet,
|
|
505
|
+
le as isStr,
|
|
506
|
+
ge as isSymbol,
|
|
507
|
+
ue as match,
|
|
508
|
+
$e as maxLenNoSpace,
|
|
509
|
+
se as maxLength,
|
|
510
|
+
he as maxValue,
|
|
511
|
+
Ve as minLenNoSpace,
|
|
512
|
+
re as minLength,
|
|
513
|
+
ye as minValue,
|
|
514
|
+
qe as required,
|
|
515
|
+
fe as sameAs,
|
|
516
|
+
De as startsWith,
|
|
517
|
+
_e as type,
|
|
518
|
+
We as url,
|
|
519
|
+
Le as useValidation
|
|
520
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dolanske/v-valid",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Model based form validation made for vue 3. Inspired by vuelidate with personal take on the API and implementation",
|
|
7
7
|
"author": "dolanske",
|