@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.
Files changed (61) hide show
  1. package/cjs/validator/v/mutators.d.ts.map +1 -1
  2. package/cjs/validator/v/mutators.js +2 -0
  3. package/cjs/validator/v/mutators.js.map +1 -1
  4. package/cjs/validator/v/rules.d.ts +3 -0
  5. package/cjs/validator/v/rules.d.ts.map +1 -1
  6. package/cjs/validator/v/rules.js +17 -1
  7. package/cjs/validator/v/rules.js.map +1 -1
  8. package/cjs/validator/v/schema.d.ts +5 -0
  9. package/cjs/validator/v/schema.d.ts.map +1 -1
  10. package/cjs/validator/v/schema.js +9 -0
  11. package/cjs/validator/v/schema.js.map +1 -1
  12. package/cjs/validator/v/utils.d.ts.map +1 -1
  13. package/cjs/validator/v/utils.js +8 -3
  14. package/cjs/validator/v/utils.js.map +1 -1
  15. package/esm/validator/v/mutators.d.ts.map +1 -1
  16. package/esm/validator/v/mutators.js +2 -0
  17. package/esm/validator/v/mutators.js.map +1 -1
  18. package/esm/validator/v/rules.d.ts +3 -0
  19. package/esm/validator/v/rules.d.ts.map +1 -1
  20. package/esm/validator/v/rules.js +17 -1
  21. package/esm/validator/v/rules.js.map +1 -1
  22. package/esm/validator/v/schema.d.ts +5 -0
  23. package/esm/validator/v/schema.d.ts.map +1 -1
  24. package/esm/validator/v/schema.js +10 -1
  25. package/esm/validator/v/schema.js.map +1 -1
  26. package/esm/validator/v/utils.d.ts.map +1 -1
  27. package/esm/validator/v/utils.js +8 -3
  28. package/esm/validator/v/utils.js.map +1 -1
  29. package/package.json +3 -3
  30. package/cjs/validator/v/validators/base.validator.d.ts +0 -48
  31. package/cjs/validator/v/validators/base.validator.d.ts.map +0 -1
  32. package/cjs/validator/v/validators/boolean.validator.d.ts +0 -18
  33. package/cjs/validator/v/validators/boolean.validator.d.ts.map +0 -1
  34. package/cjs/validator/v/validators/date.validator.d.ts +0 -46
  35. package/cjs/validator/v/validators/date.validator.d.ts.map +0 -1
  36. package/cjs/validator/v/validators/index.d.ts +0 -9
  37. package/cjs/validator/v/validators/index.d.ts.map +0 -1
  38. package/cjs/validator/v/validators/number.validator.d.ts +0 -62
  39. package/cjs/validator/v/validators/number.validator.d.ts.map +0 -1
  40. package/cjs/validator/v/validators/object.validator.d.ts +0 -18
  41. package/cjs/validator/v/validators/object.validator.d.ts.map +0 -1
  42. package/cjs/validator/v/validators/scalar.validator.d.ts +0 -44
  43. package/cjs/validator/v/validators/scalar.validator.d.ts.map +0 -1
  44. package/cjs/validator/v/validators/string.validator.d.ts +0 -142
  45. package/cjs/validator/v/validators/string.validator.d.ts.map +0 -1
  46. package/esm/validator/v/validators/base.validator.d.ts +0 -48
  47. package/esm/validator/v/validators/base.validator.d.ts.map +0 -1
  48. package/esm/validator/v/validators/boolean.validator.d.ts +0 -18
  49. package/esm/validator/v/validators/boolean.validator.d.ts.map +0 -1
  50. package/esm/validator/v/validators/date.validator.d.ts +0 -46
  51. package/esm/validator/v/validators/date.validator.d.ts.map +0 -1
  52. package/esm/validator/v/validators/index.d.ts +0 -9
  53. package/esm/validator/v/validators/index.d.ts.map +0 -1
  54. package/esm/validator/v/validators/number.validator.d.ts +0 -62
  55. package/esm/validator/v/validators/number.validator.d.ts.map +0 -1
  56. package/esm/validator/v/validators/object.validator.d.ts +0 -18
  57. package/esm/validator/v/validators/object.validator.d.ts.map +0 -1
  58. package/esm/validator/v/validators/scalar.validator.d.ts +0 -44
  59. package/esm/validator/v/validators/scalar.validator.d.ts.map +0 -1
  60. package/esm/validator/v/validators/string.validator.d.ts +0 -142
  61. package/esm/validator/v/validators/string.validator.d.ts.map +0 -1
@@ -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,MAA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