@warlock.js/core 2.8.2 → 2.8.5
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/cjs/validator/v/mutators.d.ts.map +1 -1
- package/cjs/validator/v/mutators.js +2 -0
- package/cjs/validator/v/mutators.js.map +1 -1
- package/cjs/validator/v/rules.d.ts +3 -0
- package/cjs/validator/v/rules.d.ts.map +1 -1
- package/cjs/validator/v/rules.js +17 -1
- package/cjs/validator/v/rules.js.map +1 -1
- package/cjs/validator/v/schema.d.ts +5 -0
- package/cjs/validator/v/schema.d.ts.map +1 -1
- package/cjs/validator/v/schema.js +9 -0
- package/cjs/validator/v/schema.js.map +1 -1
- package/cjs/validator/v/utils.d.ts.map +1 -1
- package/cjs/validator/v/utils.js +8 -3
- package/cjs/validator/v/utils.js.map +1 -1
- package/esm/validator/v/mutators.d.ts.map +1 -1
- package/esm/validator/v/mutators.js +2 -0
- package/esm/validator/v/mutators.js.map +1 -1
- package/esm/validator/v/rules.d.ts +3 -0
- package/esm/validator/v/rules.d.ts.map +1 -1
- package/esm/validator/v/rules.js +17 -1
- package/esm/validator/v/rules.js.map +1 -1
- package/esm/validator/v/schema.d.ts +5 -0
- package/esm/validator/v/schema.d.ts.map +1 -1
- package/esm/validator/v/schema.js +10 -1
- package/esm/validator/v/schema.js.map +1 -1
- package/esm/validator/v/utils.d.ts.map +1 -1
- package/esm/validator/v/utils.js +8 -3
- package/esm/validator/v/utils.js.map +1 -1
- package/package.json +3 -3
- package/cjs/validator/v/validators/base.validator.d.ts +0 -48
- package/cjs/validator/v/validators/base.validator.d.ts.map +0 -1
- package/cjs/validator/v/validators/boolean.validator.d.ts +0 -18
- package/cjs/validator/v/validators/boolean.validator.d.ts.map +0 -1
- package/cjs/validator/v/validators/date.validator.d.ts +0 -46
- package/cjs/validator/v/validators/date.validator.d.ts.map +0 -1
- package/cjs/validator/v/validators/index.d.ts +0 -9
- package/cjs/validator/v/validators/index.d.ts.map +0 -1
- package/cjs/validator/v/validators/number.validator.d.ts +0 -62
- package/cjs/validator/v/validators/number.validator.d.ts.map +0 -1
- package/cjs/validator/v/validators/object.validator.d.ts +0 -18
- package/cjs/validator/v/validators/object.validator.d.ts.map +0 -1
- package/cjs/validator/v/validators/scalar.validator.d.ts +0 -44
- package/cjs/validator/v/validators/scalar.validator.d.ts.map +0 -1
- package/cjs/validator/v/validators/string.validator.d.ts +0 -142
- package/cjs/validator/v/validators/string.validator.d.ts.map +0 -1
- package/esm/validator/v/validators/base.validator.d.ts +0 -48
- package/esm/validator/v/validators/base.validator.d.ts.map +0 -1
- package/esm/validator/v/validators/boolean.validator.d.ts +0 -18
- package/esm/validator/v/validators/boolean.validator.d.ts.map +0 -1
- package/esm/validator/v/validators/date.validator.d.ts +0 -46
- package/esm/validator/v/validators/date.validator.d.ts.map +0 -1
- package/esm/validator/v/validators/index.d.ts +0 -9
- package/esm/validator/v/validators/index.d.ts.map +0 -1
- package/esm/validator/v/validators/number.validator.d.ts +0 -62
- package/esm/validator/v/validators/number.validator.d.ts.map +0 -1
- package/esm/validator/v/validators/object.validator.d.ts +0 -18
- package/esm/validator/v/validators/object.validator.d.ts.map +0 -1
- package/esm/validator/v/validators/scalar.validator.d.ts +0 -44
- package/esm/validator/v/validators/scalar.validator.d.ts.map +0 -1
- package/esm/validator/v/validators/string.validator.d.ts +0 -142
- package/esm/validator/v/validators/string.validator.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date.validator.d.ts","sourceRoot":"","sources":["../../../../src/validator/v/validators/date.validator.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,qBAAa,aAAc,SAAQ,aAAa;gBAC3B,YAAY,CAAC,EAAE,MAAM;IAOxC;;OAEG;IACI,MAAM,CAAC,YAAY,CAAC,EAAE,MAAM;IAK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|
-
export * from "./boolean.validator";
|
|
4
|
-
export * from "./date.validator";
|
|
5
|
-
export * from "./number.validator";
|
|
6
|
-
export * from "./object.validator";
|
|
7
|
-
export * from "./scalar.validator";
|
|
8
|
-
export * from "./string.validator";
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/validator/v/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { BaseValidator } from "./base.validator";
|
|
2
|
-
import { ScalarValidator } from "./scalar.validator";
|
|
3
|
-
export declare class NumberValidator extends BaseValidator {
|
|
4
|
-
constructor(errorMessage?: string);
|
|
5
|
-
/**
|
|
6
|
-
* Value must be an integer
|
|
7
|
-
*/
|
|
8
|
-
integer(errorMessage?: string): this;
|
|
9
|
-
/**
|
|
10
|
-
* Value must be a float
|
|
11
|
-
*/
|
|
12
|
-
float(errorMessage?: string): this;
|
|
13
|
-
/**
|
|
14
|
-
* Value must be positive
|
|
15
|
-
*/
|
|
16
|
-
positive(errorMessage?: string): this;
|
|
17
|
-
/**
|
|
18
|
-
* Value must be negative
|
|
19
|
-
*/
|
|
20
|
-
negative(errorMessage?: string): this;
|
|
21
|
-
/**
|
|
22
|
-
* Value must be even
|
|
23
|
-
*/
|
|
24
|
-
even(errorMessage?: string): this;
|
|
25
|
-
/**
|
|
26
|
-
* Value must be odd
|
|
27
|
-
*/
|
|
28
|
-
odd(errorMessage?: string): this;
|
|
29
|
-
/**
|
|
30
|
-
* Value must be greater than the given value
|
|
31
|
-
*/
|
|
32
|
-
greaterThan(value: number, errorMessage?: string): this;
|
|
33
|
-
/**
|
|
34
|
-
* Value must be greater than or equal to the given value
|
|
35
|
-
*/
|
|
36
|
-
greaterThanOrEqual(value: number, errorMessage?: string): this;
|
|
37
|
-
/**
|
|
38
|
-
* Value must be less than the given value
|
|
39
|
-
*/
|
|
40
|
-
lessThan(value: number, errorMessage?: string): this;
|
|
41
|
-
/**
|
|
42
|
-
* Value must be less than or equal to the given value
|
|
43
|
-
*/
|
|
44
|
-
lessThanOrEqual(value: number, errorMessage?: string): this;
|
|
45
|
-
/**
|
|
46
|
-
* Value must be between the given values
|
|
47
|
-
*/
|
|
48
|
-
between(min: number, max: number, errorMessage?: string): this;
|
|
49
|
-
enum: typeof ScalarValidator.prototype.enum;
|
|
50
|
-
in: typeof ScalarValidator.prototype.in;
|
|
51
|
-
oneOf: typeof ScalarValidator.prototype.in;
|
|
52
|
-
unique: typeof ScalarValidator.prototype.unique;
|
|
53
|
-
uniqueExceptCurrentUser: typeof ScalarValidator.prototype.uniqueExceptCurrentUser;
|
|
54
|
-
uniqueExceptCurrentId: typeof ScalarValidator.prototype.uniqueExceptCurrentId;
|
|
55
|
-
exists: typeof ScalarValidator.prototype.exists;
|
|
56
|
-
existsExceptCurrentUser: typeof ScalarValidator.prototype.existsExceptCurrentUser;
|
|
57
|
-
existsExceptCurrentId: typeof ScalarValidator.prototype.existsExceptCurrentId;
|
|
58
|
-
allowsOnly: typeof ScalarValidator.prototype.allowsOnly;
|
|
59
|
-
forbids: typeof ScalarValidator.prototype.forbids;
|
|
60
|
-
notIn: typeof ScalarValidator.prototype.forbids;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=number.validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number.validator.d.ts","sourceRoot":"","sources":["../../../../src/validator/v/validators/number.validator.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,E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,CAClC;IAC3C,MAAM,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,MAAM,CACnB;IAC5B,uBAAuB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,uBAAuB,CACpC;IAC7C,qBAAqB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,qBAAqB,CAClC;IAC3C,UAAU,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,UAAU,CACvB;IAChC,OAAO,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CACpB;IAC7B,KAAK,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CAClB;CACrC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BaseValidator } from "./base.validator";
|
|
2
|
-
import type { ScalarValidator } from "./scalar.validator";
|
|
3
|
-
export declare class ObjectValidator extends BaseValidator {
|
|
4
|
-
constructor(errorMessage?: string);
|
|
5
|
-
enum: typeof ScalarValidator.prototype.enum;
|
|
6
|
-
in: typeof ScalarValidator.prototype.in;
|
|
7
|
-
oneOf: typeof ScalarValidator.prototype.in;
|
|
8
|
-
unique: typeof ScalarValidator.prototype.unique;
|
|
9
|
-
uniqueExceptCurrentUser: typeof ScalarValidator.prototype.uniqueExceptCurrentUser;
|
|
10
|
-
uniqueExceptCurrentId: typeof ScalarValidator.prototype.uniqueExceptCurrentId;
|
|
11
|
-
exists: typeof ScalarValidator.prototype.exists;
|
|
12
|
-
existsExceptCurrentUser: typeof ScalarValidator.prototype.existsExceptCurrentUser;
|
|
13
|
-
existsExceptCurrentId: typeof ScalarValidator.prototype.existsExceptCurrentId;
|
|
14
|
-
allowsOnly: typeof ScalarValidator.prototype.allowsOnly;
|
|
15
|
-
forbids: typeof ScalarValidator.prototype.forbids;
|
|
16
|
-
notIn: typeof ScalarValidator.prototype.forbids;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=object.validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object.validator.d.ts","sourceRoot":"","sources":["../../../../src/validator/v/validators/object.validator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,qBAAa,eAAgB,SAAQ,aAAa;gBAC7B,YAAY,CAAC,EAAE,MAAM;IAQjC,IAAI,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,IAAI,CAAkC;IAC7E,EAAE,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,EAAE,CAAgC;IACvE,KAAK,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,EAAE,CAAgC;IAC1E,MAAM,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,MAAM,CAAoC;IACnF,uBAAuB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,uBAAuB,CAAqD;IACtI,qBAAqB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,qBAAqB,CAAmD;IAChI,MAAM,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,MAAM,CAAoC;IACnF,uBAAuB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,uBAAuB,CAAqD;IACtI,qBAAqB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,qBAAqB,CAAmD;IAChI,UAAU,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,UAAU,CAAwC;IAC/F,OAAO,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CAAqC;IACtF,KAAK,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CAAqC;CAC5F"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { BaseValidator } from "./base.validator";
|
|
2
|
-
export declare class ScalarValidator extends BaseValidator {
|
|
3
|
-
/**
|
|
4
|
-
* Value must be one of the given values
|
|
5
|
-
*/
|
|
6
|
-
enum(values: any[], errorMessage?: string): this;
|
|
7
|
-
/**
|
|
8
|
-
* Value must be one of the given values
|
|
9
|
-
*/
|
|
10
|
-
in(values: any[], errorMessage?: string): this;
|
|
11
|
-
/**
|
|
12
|
-
* Value must be unique in the database
|
|
13
|
-
*/
|
|
14
|
-
unique(errorMessage?: string): this;
|
|
15
|
-
/**
|
|
16
|
-
* Value must be unique in the database except for the current user
|
|
17
|
-
*/
|
|
18
|
-
uniqueExceptCurrentUser(errorMessage?: string): this;
|
|
19
|
-
/**
|
|
20
|
-
* Value must be unique in the database except for the current id
|
|
21
|
-
*/
|
|
22
|
-
uniqueExceptCurrentId(errorMessage?: string): this;
|
|
23
|
-
/**
|
|
24
|
-
* Value must exist in the database
|
|
25
|
-
*/
|
|
26
|
-
exists(errorMessage?: string): this;
|
|
27
|
-
/**
|
|
28
|
-
* Value must exist in the database except for the current user
|
|
29
|
-
*/
|
|
30
|
-
existsExceptCurrentUser(errorMessage?: string): this;
|
|
31
|
-
/**
|
|
32
|
-
* Value must exist in the database except for the current id
|
|
33
|
-
*/
|
|
34
|
-
existsExceptCurrentId(errorMessage?: string): this;
|
|
35
|
-
/**
|
|
36
|
-
* Value must be one of the given values
|
|
37
|
-
*/
|
|
38
|
-
allowsOnly(values: any[], errorMessage?: string): this;
|
|
39
|
-
/**
|
|
40
|
-
* Value must not be one of the given values
|
|
41
|
-
*/
|
|
42
|
-
forbids(values: any[], errorMessage?: string): this;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=scalar.validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scalar.validator.d.ts","sourceRoot":"","sources":["../../../../src/validator/v/validators/scalar.validator.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBAAa,eAAgB,SAAQ,aAAa;IAChD;;OAEG;IACI,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM;IAMhD;;OAEG;IACI,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM;IAI9C;;OAEG;IACI,MAAM,CAAC,YAAY,CAAC,EAAE,MAAM;IAKnC;;OAEG;IACI,uBAAuB,CAAC,YAAY,CAAC,EAAE,MAAM;IAKpD;;OAEG;IACI,qBAAqB,CAAC,YAAY,CAAC,EAAE,MAAM;IAKlD;;OAEG;IACI,MAAM,CAAC,YAAY,CAAC,EAAE,MAAM;IAKnC;;OAEG;IACI,uBAAuB,CAAC,YAAY,CAAC,EAAE,MAAM;IAKpD;;OAEG;IACI,qBAAqB,CAAC,YAAY,CAAC,EAAE,MAAM;IAKlD;;OAEG;IACI,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM;IAMtD;;OAEG;IACI,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM;CAKpD"}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { BaseValidator } from "./base.validator";
|
|
2
|
-
import type { ScalarValidator } from "./scalar.validator";
|
|
3
|
-
export declare class StringValidator extends BaseValidator {
|
|
4
|
-
constructor(errorMessage?: string);
|
|
5
|
-
/**
|
|
6
|
-
* Convert string to lowercase
|
|
7
|
-
*/
|
|
8
|
-
lowercase(): this;
|
|
9
|
-
/**
|
|
10
|
-
* Convert string to uppercase
|
|
11
|
-
*/
|
|
12
|
-
uppercase(): this;
|
|
13
|
-
/**
|
|
14
|
-
* Capitalize the first letter of the string
|
|
15
|
-
*/
|
|
16
|
-
capitalize(): this;
|
|
17
|
-
/**
|
|
18
|
-
* Value must be a valid email
|
|
19
|
-
*/
|
|
20
|
-
email(errorMessage?: string): this;
|
|
21
|
-
/**
|
|
22
|
-
* Value must be a valid URL
|
|
23
|
-
*/
|
|
24
|
-
url(errorMessage?: string): this;
|
|
25
|
-
/**
|
|
26
|
-
* Value must match the value of the given field
|
|
27
|
-
*/
|
|
28
|
-
matches(field: string, errorMessage?: string): this;
|
|
29
|
-
/**
|
|
30
|
-
* Value can not have whitespace
|
|
31
|
-
*/
|
|
32
|
-
withoutWhitespace(errorMessage?: string): this;
|
|
33
|
-
/**
|
|
34
|
-
* Value must match the given pattern
|
|
35
|
-
*/
|
|
36
|
-
pattern(pattern: RegExp, errorMessage?: string): this;
|
|
37
|
-
/**
|
|
38
|
-
* Validate the current string as an uploadable hash id
|
|
39
|
-
*/
|
|
40
|
-
uploadable(errorMessage?: string): this;
|
|
41
|
-
/**
|
|
42
|
-
* Value must be exactly the given number of words
|
|
43
|
-
*/
|
|
44
|
-
words(words: number, errorMessage?: string): this;
|
|
45
|
-
/**
|
|
46
|
-
* Value length must be greater than the given length
|
|
47
|
-
*/
|
|
48
|
-
minLength(length: number, errorMessage?: string): this;
|
|
49
|
-
/**
|
|
50
|
-
* Value length must be less than the given length
|
|
51
|
-
*/
|
|
52
|
-
maxLength(length: number, errorMessage?: string): this;
|
|
53
|
-
/**
|
|
54
|
-
* Value must be of the given length
|
|
55
|
-
*/
|
|
56
|
-
length(length: number, errorMessage?: string): this;
|
|
57
|
-
/**
|
|
58
|
-
* Allow only alphabetic characters
|
|
59
|
-
*/
|
|
60
|
-
alpha(errorMessage?: string): this;
|
|
61
|
-
/**
|
|
62
|
-
* Allow only alphanumeric characters
|
|
63
|
-
*/
|
|
64
|
-
alphanumeric(errorMessage?: string): this;
|
|
65
|
-
/**
|
|
66
|
-
* Allow only numeric characters
|
|
67
|
-
*/
|
|
68
|
-
numeric(errorMessage?: string): this;
|
|
69
|
-
/**
|
|
70
|
-
* Value must starts with the given string
|
|
71
|
-
*/
|
|
72
|
-
startsWith(value: string, errorMessage?: string): this;
|
|
73
|
-
/**
|
|
74
|
-
* Value must ends with the given string
|
|
75
|
-
*/
|
|
76
|
-
endsWith(value: string, errorMessage?: string): this;
|
|
77
|
-
/**
|
|
78
|
-
* Value must contain the given string
|
|
79
|
-
*/
|
|
80
|
-
contains(value: string, errorMessage?: string): this;
|
|
81
|
-
/**
|
|
82
|
-
* Value must not contain the given string
|
|
83
|
-
*/
|
|
84
|
-
notContains(value: string, errorMessage?: string): this;
|
|
85
|
-
/**
|
|
86
|
-
* Value must be a valid IP address
|
|
87
|
-
*/
|
|
88
|
-
ip(errorMessage?: string): this;
|
|
89
|
-
/**
|
|
90
|
-
* Value must be a valid IPv4 address
|
|
91
|
-
*/
|
|
92
|
-
ip4(errorMessage?: string): this;
|
|
93
|
-
/**
|
|
94
|
-
* Value must be a valid IPv6 address
|
|
95
|
-
*/
|
|
96
|
-
ip6(errorMessage?: string): this;
|
|
97
|
-
/**
|
|
98
|
-
* Check if the string matches a credit card number
|
|
99
|
-
*/
|
|
100
|
-
creditCard(errorMessage?: string): this;
|
|
101
|
-
/**
|
|
102
|
-
* Determine if the value is a valid color
|
|
103
|
-
*/
|
|
104
|
-
color(errorMessage?: string): this;
|
|
105
|
-
/**
|
|
106
|
-
* Determine if the value is a valid hex color
|
|
107
|
-
*/
|
|
108
|
-
hexColor(errorMessage?: string): this;
|
|
109
|
-
/**
|
|
110
|
-
* Determine if the value is a valid HSL color
|
|
111
|
-
*/
|
|
112
|
-
hslColor(errorMessage?: string): this;
|
|
113
|
-
/**
|
|
114
|
-
* Determine if the value is a valid RGB color
|
|
115
|
-
*/
|
|
116
|
-
rgbColor(errorMessage?: string): this;
|
|
117
|
-
/**
|
|
118
|
-
* Determine if the value is a valid RGBA color
|
|
119
|
-
*/
|
|
120
|
-
rgbaColor(errorMessage?: string): this;
|
|
121
|
-
/**
|
|
122
|
-
* Determine if the value is a valid light color
|
|
123
|
-
*/
|
|
124
|
-
lightColor(errorMessage?: string): this;
|
|
125
|
-
/**
|
|
126
|
-
* Determine if the value is a valid dark color
|
|
127
|
-
*/
|
|
128
|
-
darkColor(errorMessage?: string): this;
|
|
129
|
-
enum: typeof ScalarValidator.prototype.enum;
|
|
130
|
-
in: typeof ScalarValidator.prototype.in;
|
|
131
|
-
oneOf: typeof ScalarValidator.prototype.in;
|
|
132
|
-
unique: typeof ScalarValidator.prototype.unique;
|
|
133
|
-
uniqueExceptCurrentUser: typeof ScalarValidator.prototype.uniqueExceptCurrentUser;
|
|
134
|
-
uniqueExceptCurrentId: typeof ScalarValidator.prototype.uniqueExceptCurrentId;
|
|
135
|
-
exists: typeof ScalarValidator.prototype.exists;
|
|
136
|
-
existsExceptCurrentUser: typeof ScalarValidator.prototype.existsExceptCurrentUser;
|
|
137
|
-
existsExceptCurrentId: typeof ScalarValidator.prototype.existsExceptCurrentId;
|
|
138
|
-
allowsOnly: typeof ScalarValidator.prototype.allowsOnly;
|
|
139
|
-
forbids: typeof ScalarValidator.prototype.forbids;
|
|
140
|
-
notIn: typeof ScalarValidator.prototype.forbids;
|
|
141
|
-
}
|
|
142
|
-
//# sourceMappingURL=string.validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.validator.d.ts","sourceRoot":"","sources":["../../../../src/validator/v/validators/string.validator.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,qBAAa,eAAgB,SAAQ,aAAa;gBAC7B,YAAY,CAAC,EAAE,MAAM;IAOxC;;OAEG;IACI,SAAS;IAKhB;;OAEG;IACI,SAAS;IAKhB;;OAEG;IACI,UAAU;IAKjB;;OAEG;IACI,KAAK,CAAC,YAAY,CAAC,EAAE,MAAM;IAKlC;;OAEG;IACI,GAAG,CAAC,YAAY,CAAC,EAAE,MAAM;IAKhC;;OAEG;IACI,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAMnD;;OAEG;IACI,iBAAiB,CAAC,YAAY,CAAC,EAAE,MAAM;IAK9C;;OAEG;IACI,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAMrD;;OAEG;IACI,UAAU,CAAC,YAAY,CAAC,EAAE,MAAM;IA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AC,EAAE,MAAM;IAKrC;;OAEG;IACI,SAAS,CAAC,YAAY,CAAC,EAAE,MAAM;IAKtC;;OAEG;IACI,UAAU,CAAC,YAAY,CAAC,EAAE,MAAM;IAKvC;;OAEG;IACI,SAAS,CAAC,YAAY,CAAC,EAAE,MAAM;IAM/B,IAAI,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,IAAI,CAAkC;IAC7E,EAAE,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,EAAE,CAAgC;IACvE,KAAK,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,EAAE,CAAgC;IAC1E,MAAM,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,MAAM,CAAoC;IACnF,uBAAuB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,uBAAuB,CAAqD;IACtI,qBAAqB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,qBAAqB,CAAmD;IAChI,MAAM,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,MAAM,CAAoC;IACnF,uBAAuB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,uBAAuB,CAAqD;IACtI,qBAAqB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,qBAAqB,CAAmD;IAChI,UAAU,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,UAAU,CAAwC;IAC/F,OAAO,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CAAqC;IACtF,KAAK,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CAAqC;CAC5F"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { ContextualSchemaRule, ContextualizedMutator, Mutator, SchemaContext, SchemaRule, SchemaRuleOptions, ValidationResult, WhenRuleOptions } from "../types";
|
|
2
|
-
export declare class BaseValidator {
|
|
3
|
-
rules: ContextualSchemaRule[];
|
|
4
|
-
mutators: ContextualizedMutator[];
|
|
5
|
-
protected defaultValue: any;
|
|
6
|
-
protected description?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Add description to the validator
|
|
9
|
-
*/
|
|
10
|
-
describe(description: string): this;
|
|
11
|
-
/**
|
|
12
|
-
* Add rule to the schema
|
|
13
|
-
*/
|
|
14
|
-
addRule<T extends SchemaRuleOptions = SchemaRuleOptions>(rule: SchemaRule<T>, errorMessage?: string): ContextualSchemaRule<T>;
|
|
15
|
-
/**
|
|
16
|
-
* Define custom rule
|
|
17
|
-
*/
|
|
18
|
-
refine(callback: (value: any, context: SchemaContext) => Promise<string | undefined> | string | undefined): this;
|
|
19
|
-
/**
|
|
20
|
-
* Add mutator to the schema
|
|
21
|
-
*/
|
|
22
|
-
addMutator(mutator: Mutator, options?: any): this;
|
|
23
|
-
/**
|
|
24
|
-
* Set default value for the field
|
|
25
|
-
*/
|
|
26
|
-
default(value: any): this;
|
|
27
|
-
/**
|
|
28
|
-
* Value must be present but not necessarily has a value
|
|
29
|
-
*/
|
|
30
|
-
present(errorMessage?: string): this;
|
|
31
|
-
/**
|
|
32
|
-
* This value must be present and has a value
|
|
33
|
-
*/
|
|
34
|
-
required(errorMessage?: string): this;
|
|
35
|
-
/**
|
|
36
|
-
* Apply conditional validation rules based on another field value
|
|
37
|
-
*/
|
|
38
|
-
when(field: string, options: Omit<WhenRuleOptions, "field">): this;
|
|
39
|
-
/**
|
|
40
|
-
* Mutate the data
|
|
41
|
-
*/
|
|
42
|
-
mutate(data: any, context: SchemaContext): Promise<any>;
|
|
43
|
-
/**
|
|
44
|
-
* Validate the data
|
|
45
|
-
*/
|
|
46
|
-
validate(data: any, context: SchemaContext): Promise<ValidationResult>;
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=base.validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.validator.d.ts","sourceRoot":"","sources":["../../../../src/validator/v/validators/base.validator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACrB,OAAO,EACP,aAAa,EACb,UAAU,E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
-
import { ScalarValidator } from "./scalar.validator";
|
|
3
|
-
export declare class BooleanValidator extends BaseValidator {
|
|
4
|
-
constructor(errorMessage?: string);
|
|
5
|
-
enum: typeof ScalarValidator.prototype.enum;
|
|
6
|
-
in: typeof ScalarValidator.prototype.in;
|
|
7
|
-
oneOf: typeof ScalarValidator.prototype.in;
|
|
8
|
-
unique: typeof ScalarValidator.prototype.unique;
|
|
9
|
-
uniqueExceptCurrentUser: typeof ScalarValidator.prototype.uniqueExceptCurrentUser;
|
|
10
|
-
uniqueExceptCurrentId: typeof ScalarValidator.prototype.uniqueExceptCurrentId;
|
|
11
|
-
exists: typeof ScalarValidator.prototype.exists;
|
|
12
|
-
existsExceptCurrentUser: typeof ScalarValidator.prototype.existsExceptCurrentUser;
|
|
13
|
-
existsExceptCurrentId: typeof ScalarValidator.prototype.existsExceptCurrentId;
|
|
14
|
-
allowsOnly: typeof ScalarValidator.prototype.allowsOnly;
|
|
15
|
-
forbids: typeof ScalarValidator.prototype.forbids;
|
|
16
|
-
notIn: typeof ScalarValidator.prototype.forbids;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=boolean.validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boolean.validator.d.ts","sourceRoot":"","sources":["../../../../src/validator/v/validators/boolean.validator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,gBAAiB,SAAQ,aAAa;gBAC9B,YAAY,CAAC,EAAE,MAAM;IAQjC,IAAI,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,IAAI,CACjB;IAC1B,EAAE,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,EAAE,CAAgC;IACvE,KAAK,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,EAAE,CAClB;IACxB,MAAM,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,MAAM,CACnB;IAC5B,uBAAuB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,uBAAuB,CACpC;IAC7C,qBAAqB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,qBAAqB,CAClC;IAC3C,MAAM,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,MAAM,CACnB;IAC5B,uBAAuB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,uBAAuB,CACpC;IAC7C,qBAAqB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,qBAAqB,CAClC;IAC3C,UAAU,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,UAAU,CACvB;IAChC,OAAO,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CACpB;IAC7B,KAAK,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CAClB;CACrC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { BaseValidator } from "./base.validator";
|
|
2
|
-
import type { ScalarValidator } from "./scalar.validator";
|
|
3
|
-
export declare class DateValidator extends BaseValidator {
|
|
4
|
-
constructor(errorMessage?: string);
|
|
5
|
-
/**
|
|
6
|
-
* Value must be in the future
|
|
7
|
-
*/
|
|
8
|
-
future(errorMessage?: string): this;
|
|
9
|
-
/**
|
|
10
|
-
* Value must be in the past
|
|
11
|
-
*/
|
|
12
|
-
past(errorMessage?: string): this;
|
|
13
|
-
/**
|
|
14
|
-
* Value must be today
|
|
15
|
-
*/
|
|
16
|
-
today(errorMessage?: string): this;
|
|
17
|
-
/**
|
|
18
|
-
* Value must be tomorrow
|
|
19
|
-
*/
|
|
20
|
-
tomorrow(errorMessage?: string): this;
|
|
21
|
-
/**
|
|
22
|
-
* Value must be yesterday
|
|
23
|
-
*/
|
|
24
|
-
yesterday(errorMessage?: string): this;
|
|
25
|
-
/**
|
|
26
|
-
* Value must be after the given date
|
|
27
|
-
*/
|
|
28
|
-
after(date: Date, errorMessage?: string): this;
|
|
29
|
-
/**
|
|
30
|
-
* Value must be before the given date
|
|
31
|
-
*/
|
|
32
|
-
before(date: Date, errorMessage?: string): this;
|
|
33
|
-
enum: typeof ScalarValidator.prototype.enum;
|
|
34
|
-
in: typeof ScalarValidator.prototype.in;
|
|
35
|
-
oneOf: typeof ScalarValidator.prototype.in;
|
|
36
|
-
unique: typeof ScalarValidator.prototype.unique;
|
|
37
|
-
uniqueExceptCurrentUser: typeof ScalarValidator.prototype.uniqueExceptCurrentUser;
|
|
38
|
-
uniqueExceptCurrentId: typeof ScalarValidator.prototype.uniqueExceptCurrentId;
|
|
39
|
-
exists: typeof ScalarValidator.prototype.exists;
|
|
40
|
-
existsExceptCurrentUser: typeof ScalarValidator.prototype.existsExceptCurrentUser;
|
|
41
|
-
existsExceptCurrentId: typeof ScalarValidator.prototype.existsExceptCurrentId;
|
|
42
|
-
allowsOnly: typeof ScalarValidator.prototype.allowsOnly;
|
|
43
|
-
forbids: typeof ScalarValidator.prototype.forbids;
|
|
44
|
-
notIn: typeof ScalarValidator.prototype.forbids;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=date.validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date.validator.d.ts","sourceRoot":"","sources":["../../../../src/validator/v/validators/date.validator.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,qBAAa,aAAc,SAAQ,aAAa;gBAC3B,YAAY,CAAC,EAAE,MAAM;IAOxC;;OAEG;IACI,MAAM,CAAC,YAAY,CAAC,EAAE,MAAM;IAKnC;;OAEG;IACI,IAAI,CAAC,YAAY,CAAC,EAAE,MAAM;IAKjC;;OAEG;IACI,KAAK,CAAC,YAAY,CAAC,EAAE,MAAM;IAKlC;;OAEG;IACI,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM;IAKrC;;OAEG;IACI,SAAS,CAAC,YAAY,CAAC,EAAE,MAAM;IAKtC;;OAEG;IACI,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC,EAAE,MAAM;IAM9C;;OAEG;IACI,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC,EAAE,MAAM;IAOxC,IAAI,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,IAAI,CAAkC;IAC7E,EAAE,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,EAAE,CAAgC;IACvE,KAAK,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,EAAE,CAAgC;IAC1E,MAAM,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,MAAM,CAAoC;IACnF,uBAAuB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,uBAAuB,CAAqD;IACtI,qBAAqB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,qBAAqB,CAAmD;IAChI,MAAM,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,MAAM,CAAoC;IACnF,uBAAuB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,uBAAuB,CAAqD;IACtI,qBAAqB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,qBAAqB,CAAmD;IAChI,UAAU,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,UAAU,CAAwC;IAC/F,OAAO,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CAAqC;IACtF,KAAK,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CAAqC;CAC5F"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from "./array.validator";
|
|
2
|
-
export * from "./base.validator";
|
|
3
|
-
export * from "./boolean.validator";
|
|
4
|
-
export * from "./date.validator";
|
|
5
|
-
export * from "./number.validator";
|
|
6
|
-
export * from "./object.validator";
|
|
7
|
-
export * from "./scalar.validator";
|
|
8
|
-
export * from "./string.validator";
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/validator/v/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { BaseValidator } from "./base.validator";
|
|
2
|
-
import { ScalarValidator } from "./scalar.validator";
|
|
3
|
-
export declare class NumberValidator extends BaseValidator {
|
|
4
|
-
constructor(errorMessage?: string);
|
|
5
|
-
/**
|
|
6
|
-
* Value must be an integer
|
|
7
|
-
*/
|
|
8
|
-
integer(errorMessage?: string): this;
|
|
9
|
-
/**
|
|
10
|
-
* Value must be a float
|
|
11
|
-
*/
|
|
12
|
-
float(errorMessage?: string): this;
|
|
13
|
-
/**
|
|
14
|
-
* Value must be positive
|
|
15
|
-
*/
|
|
16
|
-
positive(errorMessage?: string): this;
|
|
17
|
-
/**
|
|
18
|
-
* Value must be negative
|
|
19
|
-
*/
|
|
20
|
-
negative(errorMessage?: string): this;
|
|
21
|
-
/**
|
|
22
|
-
* Value must be even
|
|
23
|
-
*/
|
|
24
|
-
even(errorMessage?: string): this;
|
|
25
|
-
/**
|
|
26
|
-
* Value must be odd
|
|
27
|
-
*/
|
|
28
|
-
odd(errorMessage?: string): this;
|
|
29
|
-
/**
|
|
30
|
-
* Value must be greater than the given value
|
|
31
|
-
*/
|
|
32
|
-
greaterThan(value: number, errorMessage?: string): this;
|
|
33
|
-
/**
|
|
34
|
-
* Value must be greater than or equal to the given value
|
|
35
|
-
*/
|
|
36
|
-
greaterThanOrEqual(value: number, errorMessage?: string): this;
|
|
37
|
-
/**
|
|
38
|
-
* Value must be less than the given value
|
|
39
|
-
*/
|
|
40
|
-
lessThan(value: number, errorMessage?: string): this;
|
|
41
|
-
/**
|
|
42
|
-
* Value must be less than or equal to the given value
|
|
43
|
-
*/
|
|
44
|
-
lessThanOrEqual(value: number, errorMessage?: string): this;
|
|
45
|
-
/**
|
|
46
|
-
* Value must be between the given values
|
|
47
|
-
*/
|
|
48
|
-
between(min: number, max: number, errorMessage?: string): this;
|
|
49
|
-
enum: typeof ScalarValidator.prototype.enum;
|
|
50
|
-
in: typeof ScalarValidator.prototype.in;
|
|
51
|
-
oneOf: typeof ScalarValidator.prototype.in;
|
|
52
|
-
unique: typeof ScalarValidator.prototype.unique;
|
|
53
|
-
uniqueExceptCurrentUser: typeof ScalarValidator.prototype.uniqueExceptCurrentUser;
|
|
54
|
-
uniqueExceptCurrentId: typeof ScalarValidator.prototype.uniqueExceptCurrentId;
|
|
55
|
-
exists: typeof ScalarValidator.prototype.exists;
|
|
56
|
-
existsExceptCurrentUser: typeof ScalarValidator.prototype.existsExceptCurrentUser;
|
|
57
|
-
existsExceptCurrentId: typeof ScalarValidator.prototype.existsExceptCurrentId;
|
|
58
|
-
allowsOnly: typeof ScalarValidator.prototype.allowsOnly;
|
|
59
|
-
forbids: typeof ScalarValidator.prototype.forbids;
|
|
60
|
-
notIn: typeof ScalarValidator.prototype.forbids;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=number.validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number.validator.d.ts","sourceRoot":"","sources":["../../../../src/validator/v/validators/number.validator.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,eAAgB,SAAQ,aAAa;gBAC7B,YAAY,CAAC,EAAE,MAAM;IAOxC;;OAEG;IACI,OAAO,CAAC,YAAY,CAAC,EAAE,MAAM;IAKpC;;OAEG;IACI,KAAK,CAAC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AAqB,CAClC;IAC3C,UAAU,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,UAAU,CACvB;IAChC,OAAO,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CACpB;IAC7B,KAAK,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CAClB;CACrC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BaseValidator } from "./base.validator";
|
|
2
|
-
import type { ScalarValidator } from "./scalar.validator";
|
|
3
|
-
export declare class ObjectValidator extends BaseValidator {
|
|
4
|
-
constructor(errorMessage?: string);
|
|
5
|
-
enum: typeof ScalarValidator.prototype.enum;
|
|
6
|
-
in: typeof ScalarValidator.prototype.in;
|
|
7
|
-
oneOf: typeof ScalarValidator.prototype.in;
|
|
8
|
-
unique: typeof ScalarValidator.prototype.unique;
|
|
9
|
-
uniqueExceptCurrentUser: typeof ScalarValidator.prototype.uniqueExceptCurrentUser;
|
|
10
|
-
uniqueExceptCurrentId: typeof ScalarValidator.prototype.uniqueExceptCurrentId;
|
|
11
|
-
exists: typeof ScalarValidator.prototype.exists;
|
|
12
|
-
existsExceptCurrentUser: typeof ScalarValidator.prototype.existsExceptCurrentUser;
|
|
13
|
-
existsExceptCurrentId: typeof ScalarValidator.prototype.existsExceptCurrentId;
|
|
14
|
-
allowsOnly: typeof ScalarValidator.prototype.allowsOnly;
|
|
15
|
-
forbids: typeof ScalarValidator.prototype.forbids;
|
|
16
|
-
notIn: typeof ScalarValidator.prototype.forbids;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=object.validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object.validator.d.ts","sourceRoot":"","sources":["../../../../src/validator/v/validators/object.validator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,qBAAa,eAAgB,SAAQ,aAAa;gBAC7B,YAAY,CAAC,EAAE,MAAM;IAQjC,IAAI,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,IAAI,CAAkC;IAC7E,EAAE,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,EAAE,CAAgC;IACvE,KAAK,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,EAAE,CAAgC;IAC1E,MAAM,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,MAAM,CAAoC;IACnF,uBAAuB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,uBAAuB,CAAqD;IACtI,qBAAqB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,qBAAqB,CAAmD;IAChI,MAAM,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,MAAM,CAAoC;IACnF,uBAAuB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,uBAAuB,CAAqD;IACtI,qBAAqB,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,qBAAqB,CAAmD;IAChI,UAAU,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,UAAU,CAAwC;IAC/F,OAAO,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CAAqC;IACtF,KAAK,EAAE,OAAO,eAAe,CAAC,SAAS,CAAC,OAAO,CAAqC;CAC5F"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { BaseValidator } from "./base.validator";
|
|
2
|
-
export declare class ScalarValidator extends BaseValidator {
|
|
3
|
-
/**
|
|
4
|
-
* Value must be one of the given values
|
|
5
|
-
*/
|
|
6
|
-
enum(values: any[], errorMessage?: string): this;
|
|
7
|
-
/**
|
|
8
|
-
* Value must be one of the given values
|
|
9
|
-
*/
|
|
10
|
-
in(values: any[], errorMessage?: string): this;
|
|
11
|
-
/**
|
|
12
|
-
* Value must be unique in the database
|
|
13
|
-
*/
|
|
14
|
-
unique(errorMessage?: string): this;
|
|
15
|
-
/**
|
|
16
|
-
* Value must be unique in the database except for the current user
|
|
17
|
-
*/
|
|
18
|
-
uniqueExceptCurrentUser(errorMessage?: string): this;
|
|
19
|
-
/**
|
|
20
|
-
* Value must be unique in the database except for the current id
|
|
21
|
-
*/
|
|
22
|
-
uniqueExceptCurrentId(errorMessage?: string): this;
|
|
23
|
-
/**
|
|
24
|
-
* Value must exist in the database
|
|
25
|
-
*/
|
|
26
|
-
exists(errorMessage?: string): this;
|
|
27
|
-
/**
|
|
28
|
-
* Value must exist in the database except for the current user
|
|
29
|
-
*/
|
|
30
|
-
existsExceptCurrentUser(errorMessage?: string): this;
|
|
31
|
-
/**
|
|
32
|
-
* Value must exist in the database except for the current id
|
|
33
|
-
*/
|
|
34
|
-
existsExceptCurrentId(errorMessage?: string): this;
|
|
35
|
-
/**
|
|
36
|
-
* Value must be one of the given values
|
|
37
|
-
*/
|
|
38
|
-
allowsOnly(values: any[], errorMessage?: string): this;
|
|
39
|
-
/**
|
|
40
|
-
* Value must not be one of the given values
|
|
41
|
-
*/
|
|
42
|
-
forbids(values: any[], errorMessage?: string): this;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=scalar.validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scalar.validator.d.ts","sourceRoot":"","sources":["../../../../src/validator/v/validators/scalar.validator.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBAAa,eAAgB,SAAQ,aAAa;IAChD;;OAEG;IACI,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM;IAMhD;;OAEG;IACI,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM;IAI9C;;OAEG;IACI,MAAM,CAAC,YAAY,CAAC,EAAE,MAAM;IAKnC;;OAEG;IACI,uBAAuB,CAAC,YAAY,CAAC,EAAE,MAAM;IAKpD;;OAEG;IACI,qBAAqB,CAAC,YAAY,CAAC,EAAE,MAAM;IAKlD;;OAEG;IACI,MAAM,CAAC,YAAY,CAAC,EAAE,MAAM;IAKnC;;OAEG;IACI,uBAAuB,CAAC,YAAY,CAAC,EAAE,MAAM;IAKpD;;OAEG;IACI,qBAAqB,CAAC,YAAY,CAAC,EAAE,MAAM;IAKlD;;OAEG;IACI,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM;IAMtD;;OAEG;IACI,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM;CAKpD"}
|