@warlock.js/seal 5.31.0 → 5.32.0

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 (273) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/cjs/index.cjs +20 -16
  3. package/cjs/index.cjs.map +1 -1
  4. package/cjs/{object-VTtA-k1a.cjs → object-BoVGJ68E.cjs} +30 -13
  5. package/cjs/object-BoVGJ68E.cjs.map +1 -0
  6. package/cjs/object.cjs +2 -2
  7. package/cjs/{required-methods-chT0TXQS.cjs → required-methods-BJlnLnwa.cjs} +237 -228
  8. package/cjs/required-methods-BJlnLnwa.cjs.map +1 -0
  9. package/cjs/{string-edcPIpcU.cjs → string-CM8x0u2w.cjs} +44 -42
  10. package/cjs/string-CM8x0u2w.cjs.map +1 -0
  11. package/cjs/string.cjs +2 -2
  12. package/esm/config.d.mts +7 -8
  13. package/esm/config.d.mts.map +1 -1
  14. package/esm/factory/index.d.mts +2 -1
  15. package/esm/factory/index.mjs +1 -1
  16. package/esm/factory/validate.d.mts +3 -6
  17. package/esm/factory/validate.d.mts.map +1 -1
  18. package/esm/factory/validators.d.mts +9 -6
  19. package/esm/factory/validators.d.mts.map +1 -1
  20. package/esm/helpers/date-helpers.d.mts +1 -2
  21. package/esm/helpers/date-helpers.d.mts.map +1 -1
  22. package/esm/helpers/file.utils.d.mts +2 -4
  23. package/esm/helpers/file.utils.d.mts.map +1 -1
  24. package/esm/helpers/get-field-value.d.mts +2 -3
  25. package/esm/helpers/get-field-value.d.mts.map +1 -1
  26. package/esm/helpers/get-field-value.mjs +2 -1
  27. package/esm/helpers/get-field-value.mjs.map +1 -1
  28. package/esm/helpers/index.d.mts +6 -0
  29. package/esm/helpers/index.mjs +1 -1
  30. package/esm/helpers/path-helpers.d.mts +1 -2
  31. package/esm/helpers/path-helpers.d.mts.map +1 -1
  32. package/esm/helpers/validation-helpers.d.mts +4 -10
  33. package/esm/helpers/validation-helpers.d.mts.map +1 -1
  34. package/esm/index.d.mts +7 -0
  35. package/esm/mutators/array-mutators.d.mts +6 -7
  36. package/esm/mutators/array-mutators.d.mts.map +1 -1
  37. package/esm/mutators/boolean-mutators.d.mts +3 -4
  38. package/esm/mutators/boolean-mutators.d.mts.map +1 -1
  39. package/esm/mutators/date-mutators.d.mts +18 -19
  40. package/esm/mutators/date-mutators.d.mts.map +1 -1
  41. package/esm/mutators/index.d.mts +8 -0
  42. package/esm/mutators/index.mjs +1 -1
  43. package/esm/mutators/number-mutators.d.mts +10 -11
  44. package/esm/mutators/number-mutators.d.mts.map +1 -1
  45. package/esm/mutators/object-mutators.d.mts +4 -5
  46. package/esm/mutators/object-mutators.d.mts.map +1 -1
  47. package/esm/mutators/object-mutators.mjs +5 -4
  48. package/esm/mutators/object-mutators.mjs.map +1 -1
  49. package/esm/mutators/scalar-mutators.d.mts +2 -3
  50. package/esm/mutators/scalar-mutators.d.mts.map +1 -1
  51. package/esm/mutators/string-mutators.d.mts +37 -38
  52. package/esm/mutators/string-mutators.d.mts.map +1 -1
  53. package/esm/mutators/string-mutators.mjs +3 -1
  54. package/esm/mutators/string-mutators.mjs.map +1 -1
  55. package/esm/object.d.mts +3 -3
  56. package/esm/object.d.mts.map +1 -1
  57. package/esm/plugins/plugin-system.d.mts +11 -9
  58. package/esm/plugins/plugin-system.d.mts.map +1 -1
  59. package/esm/rules/array/array-rules.d.mts +3 -4
  60. package/esm/rules/array/array-rules.d.mts.map +1 -1
  61. package/esm/rules/array/index.d.mts +2 -0
  62. package/esm/rules/array/index.mjs +1 -1
  63. package/esm/rules/color/color-rules.d.mts +8 -9
  64. package/esm/rules/color/color-rules.d.mts.map +1 -1
  65. package/esm/rules/color/index.d.mts +2 -0
  66. package/esm/rules/color/index.mjs +1 -1
  67. package/esm/rules/common/enum.d.mts +5 -6
  68. package/esm/rules/common/enum.d.mts.map +1 -1
  69. package/esm/rules/common/equals-field-rules.d.mts +3 -4
  70. package/esm/rules/common/equals-field-rules.d.mts.map +1 -1
  71. package/esm/rules/common/index.d.mts +7 -0
  72. package/esm/rules/common/index.mjs +1 -1
  73. package/esm/rules/common/instanceof.d.mts +2 -3
  74. package/esm/rules/common/instanceof.d.mts.map +1 -1
  75. package/esm/rules/common/literal.d.mts +2 -3
  76. package/esm/rules/common/literal.d.mts.map +1 -1
  77. package/esm/rules/common/type-rules.d.mts +10 -11
  78. package/esm/rules/common/type-rules.d.mts.map +1 -1
  79. package/esm/rules/common/unknown-key.d.mts +2 -3
  80. package/esm/rules/common/unknown-key.d.mts.map +1 -1
  81. package/esm/rules/conditional/forbidden-if-rules.d.mts +7 -8
  82. package/esm/rules/conditional/forbidden-if-rules.d.mts.map +1 -1
  83. package/esm/rules/conditional/index.d.mts +11 -0
  84. package/esm/rules/conditional/index.mjs +1 -1
  85. package/esm/rules/conditional/present-if-rules.d.mts +6 -7
  86. package/esm/rules/conditional/present-if-rules.d.mts.map +1 -1
  87. package/esm/rules/conditional/present-unless-rules.d.mts +2 -3
  88. package/esm/rules/conditional/present-unless-rules.d.mts.map +1 -1
  89. package/esm/rules/conditional/present-with-rules.d.mts +4 -5
  90. package/esm/rules/conditional/present-with-rules.d.mts.map +1 -1
  91. package/esm/rules/conditional/present-without-rules.d.mts +4 -5
  92. package/esm/rules/conditional/present-without-rules.d.mts.map +1 -1
  93. package/esm/rules/conditional/required-if-rules.d.mts +10 -11
  94. package/esm/rules/conditional/required-if-rules.d.mts.map +1 -1
  95. package/esm/rules/conditional/required-unless-rules.d.mts +2 -3
  96. package/esm/rules/conditional/required-unless-rules.d.mts.map +1 -1
  97. package/esm/rules/conditional/required-when-rule.d.mts +2 -3
  98. package/esm/rules/conditional/required-when-rule.d.mts.map +1 -1
  99. package/esm/rules/conditional/required-with-rules.d.mts +4 -5
  100. package/esm/rules/conditional/required-with-rules.d.mts.map +1 -1
  101. package/esm/rules/conditional/required-without-rules.d.mts +4 -5
  102. package/esm/rules/conditional/required-without-rules.d.mts.map +1 -1
  103. package/esm/rules/core/equal.d.mts +2 -3
  104. package/esm/rules/core/equal.d.mts.map +1 -1
  105. package/esm/rules/core/forbidden.d.mts +2 -3
  106. package/esm/rules/core/forbidden.d.mts.map +1 -1
  107. package/esm/rules/core/index.d.mts +6 -0
  108. package/esm/rules/core/index.mjs +1 -1
  109. package/esm/rules/core/required.d.mts +3 -4
  110. package/esm/rules/core/required.d.mts.map +1 -1
  111. package/esm/rules/core/union.d.mts +2 -3
  112. package/esm/rules/core/union.d.mts.map +1 -1
  113. package/esm/rules/core/when.d.mts +2 -3
  114. package/esm/rules/core/when.d.mts.map +1 -1
  115. package/esm/rules/date/date-comparison-rules.d.mts +6 -7
  116. package/esm/rules/date/date-comparison-rules.d.mts.map +1 -1
  117. package/esm/rules/date/date-day-rules.d.mts +5 -6
  118. package/esm/rules/date/date-day-rules.d.mts.map +1 -1
  119. package/esm/rules/date/date-field-comparison-rules.d.mts +4 -5
  120. package/esm/rules/date/date-field-comparison-rules.d.mts.map +1 -1
  121. package/esm/rules/date/date-field-comparison-rules.mjs +6 -3
  122. package/esm/rules/date/date-field-comparison-rules.mjs.map +1 -1
  123. package/esm/rules/date/date-period-rules.d.mts +16 -16
  124. package/esm/rules/date/date-period-rules.d.mts.map +1 -1
  125. package/esm/rules/date/date-period-rules.mjs +24 -12
  126. package/esm/rules/date/date-period-rules.mjs.map +1 -1
  127. package/esm/rules/date/date-relative-rules.d.mts +4 -5
  128. package/esm/rules/date/date-relative-rules.d.mts.map +1 -1
  129. package/esm/rules/date/date-relative-rules.mjs +3 -3
  130. package/esm/rules/date/date-relative-rules.mjs.map +1 -1
  131. package/esm/rules/date/date-special-rules.d.mts +4 -5
  132. package/esm/rules/date/date-special-rules.d.mts.map +1 -1
  133. package/esm/rules/date/date.d.mts +16 -17
  134. package/esm/rules/date/date.d.mts.map +1 -1
  135. package/esm/rules/date/date.mjs +4 -2
  136. package/esm/rules/date/date.mjs.map +1 -1
  137. package/esm/rules/date/index.d.mts +8 -0
  138. package/esm/rules/date/index.mjs +1 -1
  139. package/esm/rules/file/dimensions.d.mts +5 -6
  140. package/esm/rules/file/dimensions.d.mts.map +1 -1
  141. package/esm/rules/file/file-size.d.mts +3 -4
  142. package/esm/rules/file/file-size.d.mts.map +1 -1
  143. package/esm/rules/file/index.d.mts +3 -0
  144. package/esm/rules/file/index.mjs +1 -1
  145. package/esm/rules/index.d.mts +56 -0
  146. package/esm/rules/index.mjs +1 -1
  147. package/esm/rules/length/index.d.mts +2 -0
  148. package/esm/rules/length/index.mjs +1 -1
  149. package/esm/rules/length/length-rules.d.mts +8 -9
  150. package/esm/rules/length/length-rules.d.mts.map +1 -1
  151. package/esm/rules/number/index.d.mts +2 -0
  152. package/esm/rules/number/index.mjs +1 -1
  153. package/esm/rules/number/number-rules.d.mts +11 -12
  154. package/esm/rules/number/number-rules.d.mts.map +1 -1
  155. package/esm/rules/number/number-rules.mjs +12 -6
  156. package/esm/rules/number/number-rules.mjs.map +1 -1
  157. package/esm/rules/scalar/index.mjs +1 -1
  158. package/esm/rules/string/alpha.d.mts +4 -5
  159. package/esm/rules/string/alpha.d.mts.map +1 -1
  160. package/esm/rules/string/credit-card.d.mts +2 -3
  161. package/esm/rules/string/credit-card.d.mts.map +1 -1
  162. package/esm/rules/string/email.d.mts +2 -3
  163. package/esm/rules/string/email.d.mts.map +1 -1
  164. package/esm/rules/string/id-formats.d.mts +6 -7
  165. package/esm/rules/string/id-formats.d.mts.map +1 -1
  166. package/esm/rules/string/index.d.mts +12 -0
  167. package/esm/rules/string/index.mjs +1 -1
  168. package/esm/rules/string/ip.d.mts +7 -8
  169. package/esm/rules/string/ip.d.mts.map +1 -1
  170. package/esm/rules/string/matches.d.mts +2 -3
  171. package/esm/rules/string/matches.d.mts.map +1 -1
  172. package/esm/rules/string/pattern.d.mts +2 -3
  173. package/esm/rules/string/pattern.d.mts.map +1 -1
  174. package/esm/rules/string/string-comparison.d.mts +5 -6
  175. package/esm/rules/string/string-comparison.d.mts.map +1 -1
  176. package/esm/rules/string/strong-password-rule.d.mts +2 -3
  177. package/esm/rules/string/strong-password-rule.d.mts.map +1 -1
  178. package/esm/rules/string/url.d.mts +2 -3
  179. package/esm/rules/string/url.d.mts.map +1 -1
  180. package/esm/rules/string/without-whitespace.d.mts +2 -3
  181. package/esm/rules/string/without-whitespace.d.mts.map +1 -1
  182. package/esm/standard-schema/index.d.mts +4 -0
  183. package/esm/standard-schema/json-schema.d.mts +5 -7
  184. package/esm/standard-schema/json-schema.d.mts.map +1 -1
  185. package/esm/standard-schema/map-result.d.mts +2 -3
  186. package/esm/standard-schema/map-result.d.mts.map +1 -1
  187. package/esm/standard-schema/types.d.mts +4 -5
  188. package/esm/standard-schema/types.d.mts.map +1 -1
  189. package/esm/string.d.mts +2 -3
  190. package/esm/string.d.mts.map +1 -1
  191. package/esm/types/conditional-types.d.mts +8 -6
  192. package/esm/types/conditional-types.d.mts.map +1 -1
  193. package/esm/types/context-types.d.mts +24 -15
  194. package/esm/types/context-types.d.mts.map +1 -1
  195. package/esm/types/data-transformer-types.d.mts +3 -5
  196. package/esm/types/data-transformer-types.d.mts.map +1 -1
  197. package/esm/types/date-types.d.mts +2 -3
  198. package/esm/types/date-types.d.mts.map +1 -1
  199. package/esm/types/file.types.d.mts +1 -2
  200. package/esm/types/file.types.d.mts.map +1 -1
  201. package/esm/types/index.d.mts +11 -0
  202. package/esm/types/inference-types.d.mts +14 -13
  203. package/esm/types/inference-types.d.mts.map +1 -1
  204. package/esm/types/mutator-types.d.mts +9 -7
  205. package/esm/types/mutator-types.d.mts.map +1 -1
  206. package/esm/types/result-types.d.mts +12 -7
  207. package/esm/types/result-types.d.mts.map +1 -1
  208. package/esm/types/rule-types.d.mts +25 -16
  209. package/esm/types/rule-types.d.mts.map +1 -1
  210. package/esm/types/schema-types.d.mts +1 -3
  211. package/esm/types/schema-types.d.mts.map +1 -1
  212. package/esm/validators/any-validator.d.mts +1 -3
  213. package/esm/validators/any-validator.d.mts.map +1 -1
  214. package/esm/validators/array-validator.d.mts +2 -3
  215. package/esm/validators/array-validator.d.mts.map +1 -1
  216. package/esm/validators/base-validator.d.mts +2 -3
  217. package/esm/validators/base-validator.d.mts.map +1 -1
  218. package/esm/validators/base-validator.mjs +2 -1
  219. package/esm/validators/base-validator.mjs.map +1 -1
  220. package/esm/validators/boolean-validator.d.mts +1 -3
  221. package/esm/validators/boolean-validator.d.mts.map +1 -1
  222. package/esm/validators/computed-validator.d.mts +3 -4
  223. package/esm/validators/computed-validator.d.mts.map +1 -1
  224. package/esm/validators/date-validator.d.mts +2 -3
  225. package/esm/validators/date-validator.d.mts.map +1 -1
  226. package/esm/validators/discriminated-union-validator.d.mts +3 -3
  227. package/esm/validators/discriminated-union-validator.d.mts.map +1 -1
  228. package/esm/validators/float-validator.d.mts +1 -3
  229. package/esm/validators/float-validator.d.mts.map +1 -1
  230. package/esm/validators/index.d.mts +2 -1
  231. package/esm/validators/index.mjs +1 -1
  232. package/esm/validators/instanceof-validator.d.mts +1 -3
  233. package/esm/validators/instanceof-validator.d.mts.map +1 -1
  234. package/esm/validators/int-validator.d.mts +1 -3
  235. package/esm/validators/int-validator.d.mts.map +1 -1
  236. package/esm/validators/lazy-validator.d.mts +2 -3
  237. package/esm/validators/lazy-validator.d.mts.map +1 -1
  238. package/esm/validators/literal-validator.d.mts +1 -3
  239. package/esm/validators/literal-validator.d.mts.map +1 -1
  240. package/esm/validators/managed-validator.d.mts +3 -4
  241. package/esm/validators/managed-validator.d.mts.map +1 -1
  242. package/esm/validators/methods/equality-conditional-methods.d.mts +3 -4
  243. package/esm/validators/methods/equality-conditional-methods.d.mts.map +1 -1
  244. package/esm/validators/methods/forbidden-methods.d.mts +2 -3
  245. package/esm/validators/methods/forbidden-methods.d.mts.map +1 -1
  246. package/esm/validators/methods/present-methods.d.mts +2 -3
  247. package/esm/validators/methods/present-methods.d.mts.map +1 -1
  248. package/esm/validators/methods/required-methods.d.mts +3 -4
  249. package/esm/validators/methods/required-methods.d.mts.map +1 -1
  250. package/esm/validators/number-validator.d.mts +1 -3
  251. package/esm/validators/number-validator.d.mts.map +1 -1
  252. package/esm/validators/number-validator.mjs +12 -8
  253. package/esm/validators/number-validator.mjs.map +1 -1
  254. package/esm/validators/numeric-validator.d.mts +1 -3
  255. package/esm/validators/numeric-validator.d.mts.map +1 -1
  256. package/esm/validators/object-validator.d.mts +2 -3
  257. package/esm/validators/object-validator.d.mts.map +1 -1
  258. package/esm/validators/primitive-validator.d.mts +1 -3
  259. package/esm/validators/primitive-validator.d.mts.map +1 -1
  260. package/esm/validators/record-validator.d.mts +2 -3
  261. package/esm/validators/record-validator.d.mts.map +1 -1
  262. package/esm/validators/scalar-validator.d.mts +1 -3
  263. package/esm/validators/scalar-validator.d.mts.map +1 -1
  264. package/esm/validators/string-validator.d.mts +1 -3
  265. package/esm/validators/string-validator.d.mts.map +1 -1
  266. package/esm/validators/tuple-validator.d.mts +2 -3
  267. package/esm/validators/tuple-validator.d.mts.map +1 -1
  268. package/esm/validators/union-validator.d.mts +1 -3
  269. package/esm/validators/union-validator.d.mts.map +1 -1
  270. package/package.json +1 -1
  271. package/cjs/object-VTtA-k1a.cjs.map +0 -1
  272. package/cjs/required-methods-chT0TXQS.cjs.map +0 -1
  273. package/cjs/string-edcPIpcU.cjs.map +0 -1
@@ -1,16 +1,16 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
2
  import { WeekDay } from "../../types/date-types.mjs";
3
-
3
+ import "../../types/index.mjs";
4
4
  //#region ../../packages/seal/src/rules/date/date.d.ts
5
5
  /**
6
6
  * Date rule - validates date format
7
7
  */
8
- declare const dateRule: SchemaRule;
8
+ export declare const dateRule: SchemaRule;
9
9
  /**
10
10
  * Min date rule - date must be >= given date or field
11
11
  * Smart detection: date value or field name
12
12
  */
13
- declare const minDateRule: SchemaRule<{
13
+ export declare const minDateRule: SchemaRule<{
14
14
  dateOrField: Date | string | number;
15
15
  scope?: "global" | "sibling";
16
16
  }>;
@@ -18,80 +18,79 @@ declare const minDateRule: SchemaRule<{
18
18
  * Max date rule - date must be <= given date or field
19
19
  * Smart detection: date value or field name
20
20
  */
21
- declare const maxDateRule: SchemaRule<{
21
+ export declare const maxDateRule: SchemaRule<{
22
22
  dateOrField: Date | string | number;
23
23
  scope?: "global" | "sibling";
24
24
  }>;
25
25
  /**
26
26
  * From today rule - date must be today or in the future
27
27
  */
28
- declare const fromTodayRule: SchemaRule;
28
+ export declare const fromTodayRule: SchemaRule;
29
29
  /**
30
30
  * Before today rule - date must be before today
31
31
  */
32
- declare const beforeTodayRule: SchemaRule;
32
+ export declare const beforeTodayRule: SchemaRule;
33
33
  /**
34
34
  * From hour rule - time must be from specific hour onwards
35
35
  */
36
- declare const fromHourRule: SchemaRule<{
36
+ export declare const fromHourRule: SchemaRule<{
37
37
  hour: number;
38
38
  }>;
39
39
  /**
40
40
  * Before hour rule - time must be before specific hour
41
41
  */
42
- declare const beforeHourRule: SchemaRule<{
42
+ export declare const beforeHourRule: SchemaRule<{
43
43
  hour: number;
44
44
  }>;
45
45
  /**
46
46
  * Between hours rule - time must be between start and end hours
47
47
  */
48
- declare const betweenHoursRule: SchemaRule<{
48
+ export declare const betweenHoursRule: SchemaRule<{
49
49
  startHour: number;
50
50
  endHour: number;
51
51
  }>;
52
52
  /**
53
53
  * From minute rule - time must be from specific minute onwards
54
54
  */
55
- declare const fromMinuteRule: SchemaRule<{
55
+ export declare const fromMinuteRule: SchemaRule<{
56
56
  minute: number;
57
57
  }>;
58
58
  /**
59
59
  * Before minute rule - time must be before specific minute
60
60
  */
61
- declare const beforeMinuteRule: SchemaRule<{
61
+ export declare const beforeMinuteRule: SchemaRule<{
62
62
  minute: number;
63
63
  }>;
64
64
  /**
65
65
  * Between minutes rule - time must be between start and end minutes
66
66
  */
67
- declare const betweenMinutesRule: SchemaRule<{
67
+ export declare const betweenMinutesRule: SchemaRule<{
68
68
  startMinute: number;
69
69
  endMinute: number;
70
70
  }>;
71
71
  /**
72
72
  * Age rule - calculate age from date
73
73
  */
74
- declare const ageRule: SchemaRule<{
74
+ export declare const ageRule: SchemaRule<{
75
75
  years: number;
76
76
  }>;
77
77
  /**
78
78
  * Min age rule - minimum age requirement
79
79
  */
80
- declare const minAgeRule: SchemaRule<{
80
+ export declare const minAgeRule: SchemaRule<{
81
81
  years: number;
82
82
  }>;
83
83
  /**
84
84
  * Max age rule - maximum age requirement
85
85
  */
86
- declare const maxAgeRule: SchemaRule<{
86
+ export declare const maxAgeRule: SchemaRule<{
87
87
  years: number;
88
88
  }>;
89
89
  /**
90
90
  * Week day rule - date must be specific weekday
91
91
  */
92
- declare const weekDayRule: SchemaRule<{
92
+ export declare const weekDayRule: SchemaRule<{
93
93
  day: WeekDay;
94
94
  }>;
95
95
  //#endregion
96
- export { ageRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenHoursRule, betweenMinutesRule, dateRule, fromHourRule, fromMinuteRule, fromTodayRule, maxAgeRule, maxDateRule, minAgeRule, minDateRule, weekDayRule };
97
96
  //# sourceMappingURL=date.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/date/date.ts"],"mappings":";;;;;;AAUA;cAAa,QAAA,EAAU,UAUtB;;;AAAA;AAMD;cAAa,WAAA,EAAa,UAAU;EAClC,WAAA,EAAa,IAAA;EACb,KAAA;AAAA;;;;;cAqCW,WAAA,EAAa,UAAU;EAClC,WAAA,EAAa,IAAA;EACb,KAAA;AAAA;;;;cAmCW,aAAA,EAAe,UAc3B;;;AAjDM;cAsDM,eAAA,EAAiB,UAc7B;;;;cAKY,YAAA,EAAc,UAAU;EAAG,IAAI;AAAA;;;AAL3C;cAwBY,cAAA,EAAgB,UAAU;EAAG,IAAI;AAAA;;AAnBF;AAmB5C;cAmBa,gBAAA,EAAkB,UAAU;EACvC,SAAA;EACA,OAAA;AAAA;AAFF;;;AAAA,cAwBa,cAAA,EAAgB,UAAU;EAAG,MAAM;AAAA;;;AAtBvC;cA0CI,gBAAA,EAAkB,UAAU;EAAG,MAAM;AAAA;;AApBF;AAoBhD;cAoBa,kBAAA,EAAoB,UAAU;EACzC,WAAA;EACA,SAAA;AAAA;AAFF;;;AAAA,cAyBa,OAAA,EAAS,UAAU;EAAG,KAAK;AAAA;;;AAvB7B;cAiDE,UAAA,EAAY,UAAU;EAAG,KAAK;AAAA;;AA1BH;AA0BxC;cA0Ba,UAAA,EAAY,UAAU;EAAG,KAAK;AAAA;AA1BA;AA0B3C;;AA1B2C,cAoD9B,WAAA,EAAa,UAAU;EAAG,GAAA,EAAK,OAAA;AAAA"}
1
+ {"version":3,"file":"date.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/date/date.ts"],"mappings":";;;;;;;qBAUa,UAAU;;;;;qBAgBV,aAAa;EACxB,aAAa;EACb;;;;;;qBAqCW,aAAa;EACxB,aAAa;EACb;;;;;qBAmCW,eAAe;;;;qBAmBf,iBAAiB;;;;qBAmBjB,cAAc;EAAa;;;;;qBAmB3B,gBAAgB;EAAa;;;;;qBAmB7B,kBAAkB;EAC7B;EACA;;;;;qBAsBW,gBAAgB;EAAa;;;;;qBAoB7B,kBAAkB;EAAa;;;;;qBAoB/B,oBAAoB;EAC/B;EACA;;;;;qBAuBW,SAAS;EAAa;;;;;qBA0BtB,YAAY;EAAa;;;;;qBA0BzB,YAAY;EAAa;;;;;qBA0BzB,aAAa;EAAa,KAAK"}
@@ -29,7 +29,8 @@ const minDateRule = {
29
29
  let compareDate;
30
30
  if (isDateValue(dateOrField)) compareDate = new Date(dateOrField);
31
31
  else {
32
- const fieldValue = get(scope === "sibling" ? context.parent : context.allValues, dateOrField);
32
+ const source = scope === "sibling" ? context.parent : context.allValues;
33
+ const fieldValue = get(source, dateOrField);
33
34
  if (fieldValue === void 0) return VALID_RULE;
34
35
  compareDate = new Date(fieldValue);
35
36
  }
@@ -49,7 +50,8 @@ const maxDateRule = {
49
50
  let compareDate;
50
51
  if (isDateValue(dateOrField)) compareDate = new Date(dateOrField);
51
52
  else {
52
- const fieldValue = get(scope === "sibling" ? context.parent : context.allValues, dateOrField);
53
+ const source = scope === "sibling" ? context.parent : context.allValues;
54
+ const fieldValue = get(source, dateOrField);
53
55
  if (fieldValue === void 0) return VALID_RULE;
54
56
  compareDate = new Date(fieldValue);
55
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"date.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/date/date.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isDateValue } from \"../../helpers/date-helpers\";\nimport type { SchemaRule } from \"../../types\";\nimport type { WeekDay } from \"../../types/date-types\";\nimport { WEEK_DAYS } from \"../../types/date-types\";\n\n/**\n * Date rule - validates date format\n */\nexport const dateRule: SchemaRule = {\n name: \"date\",\n defaultErrorMessage: \"The :input must be a valid date\",\n async validate(value: any, context) {\n if (value instanceof Date && !isNaN(value.getTime())) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Min date rule - date must be >= given date or field\n * Smart detection: date value or field name\n */\nexport const minDateRule: SchemaRule<{\n dateOrField: Date | string | number;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"minDate\",\n description: \"The field must be at least the given date or field\",\n defaultErrorMessage: \"The :input must be at least :dateOrField\",\n async validate(value: Date, context) {\n const { dateOrField, scope = \"global\" } = this.context.options;\n let compareDate: Date;\n\n if (isDateValue(dateOrField)) {\n // Value comparison\n compareDate = new Date(dateOrField);\n } else {\n // Field comparison\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, dateOrField as string);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n compareDate = new Date(fieldValue);\n }\n\n const inputDate = new Date(value);\n\n if (inputDate >= compareDate) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Max date rule - date must be <= given date or field\n * Smart detection: date value or field name\n */\nexport const maxDateRule: SchemaRule<{\n dateOrField: Date | string | number;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"maxDate\",\n defaultErrorMessage: \"The :input must be at most :dateOrField\",\n async validate(value: Date, context) {\n const { dateOrField, scope = \"global\" } = this.context.options;\n let compareDate: Date;\n\n if (isDateValue(dateOrField)) {\n // Value comparison\n compareDate = new Date(dateOrField);\n } else {\n // Field comparison\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, dateOrField as string);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n compareDate = new Date(fieldValue);\n }\n\n const inputDate = new Date(value);\n\n if (inputDate <= compareDate) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * From today rule - date must be today or in the future\n */\nexport const fromTodayRule: SchemaRule = {\n name: \"fromToday\",\n defaultErrorMessage: \"The :input must be today or in the future\",\n async validate(value: Date, context) {\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n const inputDate = new Date(value);\n inputDate.setHours(0, 0, 0, 0);\n\n if (inputDate >= today) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Before today rule - date must be before today\n */\nexport const beforeTodayRule: SchemaRule = {\n name: \"beforeToday\",\n defaultErrorMessage: \"The :input must be before today\",\n async validate(value: Date, context) {\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n const inputDate = new Date(value);\n inputDate.setHours(0, 0, 0, 0);\n\n if (inputDate < today) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * From hour rule - time must be from specific hour onwards\n */\nexport const fromHourRule: SchemaRule<{ hour: number }> = {\n name: \"fromHour\",\n defaultErrorMessage: \"The :input must be from :hour:00 onwards\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const hour = inputDate.getHours();\n\n if (hour >= this.context.options.hour) {\n return VALID_RULE;\n }\n\n this.context.translationParams.hour = this.context.options.hour;\n return invalidRule(this, context);\n },\n};\n\n/**\n * Before hour rule - time must be before specific hour\n */\nexport const beforeHourRule: SchemaRule<{ hour: number }> = {\n name: \"beforeHour\",\n defaultErrorMessage: \"The :input must be before :hour:00\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const hour = inputDate.getHours();\n\n if (hour < this.context.options.hour) {\n return VALID_RULE;\n }\n\n this.context.translationParams.hour = this.context.options.hour;\n return invalidRule(this, context);\n },\n};\n\n/**\n * Between hours rule - time must be between start and end hours\n */\nexport const betweenHoursRule: SchemaRule<{\n startHour: number;\n endHour: number;\n}> = {\n name: \"betweenHours\",\n defaultErrorMessage: \"The :input must be between :startHour:00 and :endHour:00\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const hour = inputDate.getHours();\n const { startHour, endHour } = this.context.options;\n\n if (hour >= startHour && hour <= endHour) {\n return VALID_RULE;\n }\n\n this.context.translationParams.startHour = startHour;\n this.context.translationParams.endHour = endHour;\n return invalidRule(this, context);\n },\n};\n\n/**\n * From minute rule - time must be from specific minute onwards\n */\nexport const fromMinuteRule: SchemaRule<{ minute: number }> = {\n name: \"fromMinute\",\n defaultErrorMessage: \"The :input must be from minute :minute onwards\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const minute = inputDate.getMinutes();\n\n if (minute >= this.context.options.minute) {\n return VALID_RULE;\n }\n\n this.context.translationParams.minute = this.context.options.minute;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Before minute rule - time must be before specific minute\n */\nexport const beforeMinuteRule: SchemaRule<{ minute: number }> = {\n name: \"beforeMinute\",\n defaultErrorMessage: \"The :input must be before minute :minute\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const minute = inputDate.getMinutes();\n\n if (minute < this.context.options.minute) {\n return VALID_RULE;\n }\n\n this.context.translationParams.minute = this.context.options.minute;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Between minutes rule - time must be between start and end minutes\n */\nexport const betweenMinutesRule: SchemaRule<{\n startMinute: number;\n endMinute: number;\n}> = {\n name: \"betweenMinutes\",\n defaultErrorMessage: \"The :input must be between minute :startMinute and :endMinute\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const minute = inputDate.getMinutes();\n const { startMinute, endMinute } = this.context.options;\n\n if (minute >= startMinute && minute <= endMinute) {\n return VALID_RULE;\n }\n\n this.context.translationParams.startMinute = startMinute;\n this.context.translationParams.endMinute = endMinute;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Age rule - calculate age from date\n */\nexport const ageRule: SchemaRule<{ years: number }> = {\n name: \"age\",\n defaultErrorMessage: \"The :input must be exactly :years years old\",\n async validate(value: Date, context) {\n const birthDate = new Date(value);\n const today = new Date();\n let age = today.getFullYear() - birthDate.getFullYear();\n const monthDiff = today.getMonth() - birthDate.getMonth();\n\n if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {\n age--;\n }\n\n if (age === this.context.options.years) {\n return VALID_RULE;\n }\n\n this.context.translationParams.years = this.context.options.years;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Min age rule - minimum age requirement\n */\nexport const minAgeRule: SchemaRule<{ years: number }> = {\n name: \"minAge\",\n defaultErrorMessage: \"The :input must be at least :years years old\",\n async validate(value: Date, context) {\n const birthDate = new Date(value);\n const today = new Date();\n let age = today.getFullYear() - birthDate.getFullYear();\n const monthDiff = today.getMonth() - birthDate.getMonth();\n\n if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {\n age--;\n }\n\n if (age >= this.context.options.years) {\n return VALID_RULE;\n }\n\n this.context.translationParams.years = this.context.options.years;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Max age rule - maximum age requirement\n */\nexport const maxAgeRule: SchemaRule<{ years: number }> = {\n name: \"maxAge\",\n defaultErrorMessage: \"The :input must be at most :years years old\",\n async validate(value: Date, context) {\n const birthDate = new Date(value);\n const today = new Date();\n let age = today.getFullYear() - birthDate.getFullYear();\n const monthDiff = today.getMonth() - birthDate.getMonth();\n\n if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {\n age--;\n }\n\n if (age <= this.context.options.years) {\n return VALID_RULE;\n }\n\n this.context.translationParams.years = this.context.options.years;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Week day rule - date must be specific weekday\n */\nexport const weekDayRule: SchemaRule<{ day: WeekDay }> = {\n name: \"weekDay\",\n defaultErrorMessage: \"The :input must be a :day\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const dayOfWeek = inputDate.getDay();\n const expectedDay = WEEK_DAYS[this.context.options.day];\n\n if (dayOfWeek === expectedDay) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.day = this.context.options.day;\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;;;AAUA,MAAa,WAAuB;CAClC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,iBAAiB,QAAQ,CAAC,MAAM,MAAM,QAAQ,CAAC,GACjD,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;;AAMA,MAAa,cAGR;CACH,MAAM;CACN,aAAa;CACb,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,EAAE,aAAa,QAAQ,aAAa,KAAK,QAAQ;EACvD,IAAI;EAEJ,IAAI,YAAY,WAAW,GAEzB,cAAc,IAAI,KAAK,WAAW;OAC7B;GAGL,MAAM,aAAa,IADJ,UAAU,YAAY,QAAQ,SAAS,QAAQ,WAC/B,WAAqB;GAEpD,IAAI,eAAe,QACjB,OAAO;GAGT,cAAc,IAAI,KAAK,UAAU;EACnC;EAIA,IAAI,IAFkB,KAAK,KAEf,KAAK,aACf,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;;AAMA,MAAa,cAGR;CACH,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,EAAE,aAAa,QAAQ,aAAa,KAAK,QAAQ;EACvD,IAAI;EAEJ,IAAI,YAAY,WAAW,GAEzB,cAAc,IAAI,KAAK,WAAW;OAC7B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,SAAS,IAAI,UAAU,SAAS;EAExD,IAAI,YAAY,KAAM,cAAc,KAAK,MAAM,QAAQ,IAAI,UAAU,QAAQ,GAC3E;EAGF,IAAI,OAAO,KAAK,QAAQ,QAAQ,OAC9B,OAAO;EAGT,KAAK,QAAQ,kBAAkB,QAAQ,KAAK,QAAQ,QAAQ;EAE5D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,cAA4C;CACvD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAKnC,IAHkB,IADI,KAAK,KACD,CAAC,CAAC,OAGhB,MAFQ,UAAU,KAAK,QAAQ,QAAQ,MAGjD,OAAO;EAGT,KAAK,QAAQ,mBAAmB,MAAM,KAAK,QAAQ,QAAQ;EAE3D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"date.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/date/date.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isDateValue } from \"../../helpers/date-helpers\";\nimport type { SchemaRule } from \"../../types\";\nimport type { WeekDay } from \"../../types/date-types\";\nimport { WEEK_DAYS } from \"../../types/date-types\";\n\n/**\n * Date rule - validates date format\n */\nexport const dateRule: SchemaRule = {\n name: \"date\",\n defaultErrorMessage: \"The :input must be a valid date\",\n async validate(value: any, context) {\n if (value instanceof Date && !isNaN(value.getTime())) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Min date rule - date must be >= given date or field\n * Smart detection: date value or field name\n */\nexport const minDateRule: SchemaRule<{\n dateOrField: Date | string | number;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"minDate\",\n description: \"The field must be at least the given date or field\",\n defaultErrorMessage: \"The :input must be at least :dateOrField\",\n async validate(value: Date, context) {\n const { dateOrField, scope = \"global\" } = this.context.options;\n let compareDate: Date;\n\n if (isDateValue(dateOrField)) {\n // Value comparison\n compareDate = new Date(dateOrField);\n } else {\n // Field comparison\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, dateOrField as string);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n compareDate = new Date(fieldValue);\n }\n\n const inputDate = new Date(value);\n\n if (inputDate >= compareDate) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Max date rule - date must be <= given date or field\n * Smart detection: date value or field name\n */\nexport const maxDateRule: SchemaRule<{\n dateOrField: Date | string | number;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"maxDate\",\n defaultErrorMessage: \"The :input must be at most :dateOrField\",\n async validate(value: Date, context) {\n const { dateOrField, scope = \"global\" } = this.context.options;\n let compareDate: Date;\n\n if (isDateValue(dateOrField)) {\n // Value comparison\n compareDate = new Date(dateOrField);\n } else {\n // Field comparison\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, dateOrField as string);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n compareDate = new Date(fieldValue);\n }\n\n const inputDate = new Date(value);\n\n if (inputDate <= compareDate) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * From today rule - date must be today or in the future\n */\nexport const fromTodayRule: SchemaRule = {\n name: \"fromToday\",\n defaultErrorMessage: \"The :input must be today or in the future\",\n async validate(value: Date, context) {\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n const inputDate = new Date(value);\n inputDate.setHours(0, 0, 0, 0);\n\n if (inputDate >= today) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Before today rule - date must be before today\n */\nexport const beforeTodayRule: SchemaRule = {\n name: \"beforeToday\",\n defaultErrorMessage: \"The :input must be before today\",\n async validate(value: Date, context) {\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n const inputDate = new Date(value);\n inputDate.setHours(0, 0, 0, 0);\n\n if (inputDate < today) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * From hour rule - time must be from specific hour onwards\n */\nexport const fromHourRule: SchemaRule<{ hour: number }> = {\n name: \"fromHour\",\n defaultErrorMessage: \"The :input must be from :hour:00 onwards\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const hour = inputDate.getHours();\n\n if (hour >= this.context.options.hour) {\n return VALID_RULE;\n }\n\n this.context.translationParams.hour = this.context.options.hour;\n return invalidRule(this, context);\n },\n};\n\n/**\n * Before hour rule - time must be before specific hour\n */\nexport const beforeHourRule: SchemaRule<{ hour: number }> = {\n name: \"beforeHour\",\n defaultErrorMessage: \"The :input must be before :hour:00\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const hour = inputDate.getHours();\n\n if (hour < this.context.options.hour) {\n return VALID_RULE;\n }\n\n this.context.translationParams.hour = this.context.options.hour;\n return invalidRule(this, context);\n },\n};\n\n/**\n * Between hours rule - time must be between start and end hours\n */\nexport const betweenHoursRule: SchemaRule<{\n startHour: number;\n endHour: number;\n}> = {\n name: \"betweenHours\",\n defaultErrorMessage: \"The :input must be between :startHour:00 and :endHour:00\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const hour = inputDate.getHours();\n const { startHour, endHour } = this.context.options;\n\n if (hour >= startHour && hour <= endHour) {\n return VALID_RULE;\n }\n\n this.context.translationParams.startHour = startHour;\n this.context.translationParams.endHour = endHour;\n return invalidRule(this, context);\n },\n};\n\n/**\n * From minute rule - time must be from specific minute onwards\n */\nexport const fromMinuteRule: SchemaRule<{ minute: number }> = {\n name: \"fromMinute\",\n defaultErrorMessage: \"The :input must be from minute :minute onwards\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const minute = inputDate.getMinutes();\n\n if (minute >= this.context.options.minute) {\n return VALID_RULE;\n }\n\n this.context.translationParams.minute = this.context.options.minute;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Before minute rule - time must be before specific minute\n */\nexport const beforeMinuteRule: SchemaRule<{ minute: number }> = {\n name: \"beforeMinute\",\n defaultErrorMessage: \"The :input must be before minute :minute\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const minute = inputDate.getMinutes();\n\n if (minute < this.context.options.minute) {\n return VALID_RULE;\n }\n\n this.context.translationParams.minute = this.context.options.minute;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Between minutes rule - time must be between start and end minutes\n */\nexport const betweenMinutesRule: SchemaRule<{\n startMinute: number;\n endMinute: number;\n}> = {\n name: \"betweenMinutes\",\n defaultErrorMessage: \"The :input must be between minute :startMinute and :endMinute\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const minute = inputDate.getMinutes();\n const { startMinute, endMinute } = this.context.options;\n\n if (minute >= startMinute && minute <= endMinute) {\n return VALID_RULE;\n }\n\n this.context.translationParams.startMinute = startMinute;\n this.context.translationParams.endMinute = endMinute;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Age rule - calculate age from date\n */\nexport const ageRule: SchemaRule<{ years: number }> = {\n name: \"age\",\n defaultErrorMessage: \"The :input must be exactly :years years old\",\n async validate(value: Date, context) {\n const birthDate = new Date(value);\n const today = new Date();\n let age = today.getFullYear() - birthDate.getFullYear();\n const monthDiff = today.getMonth() - birthDate.getMonth();\n\n if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {\n age--;\n }\n\n if (age === this.context.options.years) {\n return VALID_RULE;\n }\n\n this.context.translationParams.years = this.context.options.years;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Min age rule - minimum age requirement\n */\nexport const minAgeRule: SchemaRule<{ years: number }> = {\n name: \"minAge\",\n defaultErrorMessage: \"The :input must be at least :years years old\",\n async validate(value: Date, context) {\n const birthDate = new Date(value);\n const today = new Date();\n let age = today.getFullYear() - birthDate.getFullYear();\n const monthDiff = today.getMonth() - birthDate.getMonth();\n\n if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {\n age--;\n }\n\n if (age >= this.context.options.years) {\n return VALID_RULE;\n }\n\n this.context.translationParams.years = this.context.options.years;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Max age rule - maximum age requirement\n */\nexport const maxAgeRule: SchemaRule<{ years: number }> = {\n name: \"maxAge\",\n defaultErrorMessage: \"The :input must be at most :years years old\",\n async validate(value: Date, context) {\n const birthDate = new Date(value);\n const today = new Date();\n let age = today.getFullYear() - birthDate.getFullYear();\n const monthDiff = today.getMonth() - birthDate.getMonth();\n\n if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {\n age--;\n }\n\n if (age <= this.context.options.years) {\n return VALID_RULE;\n }\n\n this.context.translationParams.years = this.context.options.years;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Week day rule - date must be specific weekday\n */\nexport const weekDayRule: SchemaRule<{ day: WeekDay }> = {\n name: \"weekDay\",\n defaultErrorMessage: \"The :input must be a :day\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const dayOfWeek = inputDate.getDay();\n const expectedDay = WEEK_DAYS[this.context.options.day];\n\n if (dayOfWeek === expectedDay) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.day = this.context.options.day;\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;;;AAUA,MAAa,WAAuB;CAClC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,iBAAiB,QAAQ,CAAC,MAAM,MAAM,QAAQ,CAAC,GACjD,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;;AAMA,MAAa,cAGR;CACH,MAAM;CACN,aAAa;CACb,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,EAAE,aAAa,QAAQ,aAAa,KAAK,QAAQ;EACvD,IAAI;EAEJ,IAAI,YAAY,WAAW,GAEzB,cAAc,IAAI,KAAK,WAAW;OAC7B;GAEL,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;GAC9D,MAAM,aAAa,IAA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IAAI,UAAU,QAAQ,GAC3E;EAGF,IAAI,OAAO,KAAK,QAAQ,QAAQ,OAC9B,OAAO;EAGT,KAAK,QAAQ,kBAAkB,QAAQ,KAAK,QAAQ,QAAQ;EAE5D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,aAA4C;CACvD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,YAAY,IAAI,KAAK,KAAK;EAChC,MAAM,wBAAQ,IAAI,KAAK;EACvB,IAAI,MAAM,MAAM,YAAY,IAAI,UAAU,YAAY;EACtD,MAAM,YAAY,MAAM,SAAS,IAAI,UAAU,SAAS;EAExD,IAAI,YAAY,KAAM,cAAc,KAAK,MAAM,QAAQ,IAAI,UAAU,QAAQ,GAC3E;EAGF,IAAI,OAAO,KAAK,QAAQ,QAAQ,OAC9B,OAAO;EAGT,KAAK,QAAQ,kBAAkB,QAAQ,KAAK,QAAQ,QAAQ;EAE5D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,cAA4C;CACvD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAKnC,IAHkB,IADI,KAAK,KACD,CAAC,CAAC,OAGhB,MAFQ,UAAU,KAAK,QAAQ,QAAQ,MAGjD,OAAO;EAGT,KAAK,QAAQ,mBAAmB,MAAM,KAAK,QAAQ,QAAQ;EAE3D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -0,0 +1,8 @@
1
+ import { ageRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenHoursRule, betweenMinutesRule, dateRule, fromHourRule, fromMinuteRule, fromTodayRule, maxAgeRule, maxDateRule, minAgeRule, minDateRule, weekDayRule } from "./date.mjs";
2
+ import { afterTodayRule, betweenDatesRule, futureRule, pastRule, todayRule } from "./date-comparison-rules.mjs";
3
+ import { businessDayRule, weekdayRule, weekdaysRule, weekendRule } from "./date-day-rules.mjs";
4
+ import { afterFieldRule, beforeFieldRule, sameAsFieldDateRule } from "./date-field-comparison-rules.mjs";
5
+ import { Month, betweenDaysRule, betweenMonthsRule, betweenTimesRule, betweenYearsRule, maxDayRule, maxMonthRule, maxYearRule, minDayRule, minMonthRule, minYearRule, monthRule, quarterRule, yearRule } from "./date-period-rules.mjs";
6
+ import { withinDaysRule, withinFutureDaysRule, withinPastDaysRule } from "./date-relative-rules.mjs";
7
+ import { betweenAgeRule, birthdayRule, leapYearRule } from "./date-special-rules.mjs";
8
+ export { Month, afterFieldRule, afterTodayRule, ageRule, beforeFieldRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenAgeRule, betweenDatesRule, betweenDaysRule, betweenHoursRule, betweenMinutesRule, betweenMonthsRule, betweenTimesRule, betweenYearsRule, birthdayRule, businessDayRule, dateRule, fromHourRule, fromMinuteRule, fromTodayRule, futureRule, leapYearRule, maxAgeRule, maxDateRule, maxDayRule, maxMonthRule, maxYearRule, minAgeRule, minDateRule, minDayRule, minMonthRule, minYearRule, monthRule, pastRule, quarterRule, sameAsFieldDateRule, todayRule, weekDayRule, weekdayRule, weekdaysRule, weekendRule, withinDaysRule, withinFutureDaysRule, withinPastDaysRule, yearRule };
@@ -6,4 +6,4 @@ import { betweenDaysRule, betweenMonthsRule, betweenTimesRule, betweenYearsRule,
6
6
  import { withinDaysRule, withinFutureDaysRule, withinPastDaysRule } from "./date-relative-rules.mjs";
7
7
  import { betweenAgeRule, birthdayRule, leapYearRule } from "./date-special-rules.mjs";
8
8
 
9
- export { };
9
+ export { afterFieldRule, afterTodayRule, ageRule, beforeFieldRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenAgeRule, betweenDatesRule, betweenDaysRule, betweenHoursRule, betweenMinutesRule, betweenMonthsRule, betweenTimesRule, betweenYearsRule, birthdayRule, businessDayRule, dateRule, fromHourRule, fromMinuteRule, fromTodayRule, futureRule, leapYearRule, maxAgeRule, maxDateRule, maxDayRule, maxMonthRule, maxYearRule, minAgeRule, minDateRule, minDayRule, minMonthRule, minYearRule, monthRule, pastRule, quarterRule, sameAsFieldDateRule, todayRule, weekDayRule, weekdayRule, weekdaysRule, weekendRule, withinDaysRule, withinFutureDaysRule, withinPastDaysRule, yearRule };
@@ -1,30 +1,29 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
-
2
+ import "../../types/index.mjs";
3
3
  //#region ../../packages/seal/src/rules/file/dimensions.d.ts
4
4
  /**
5
5
  * Min width rule - image width validation
6
6
  */
7
- declare const minWidthRule: SchemaRule<{
7
+ export declare const minWidthRule: SchemaRule<{
8
8
  minWidth: number;
9
9
  }>;
10
10
  /**
11
11
  * Max width rule - image width validation
12
12
  */
13
- declare const maxWidthRule: SchemaRule<{
13
+ export declare const maxWidthRule: SchemaRule<{
14
14
  maxWidth: number;
15
15
  }>;
16
16
  /**
17
17
  * Min height rule - image height validation
18
18
  */
19
- declare const minHeightRule: SchemaRule<{
19
+ export declare const minHeightRule: SchemaRule<{
20
20
  minHeight: number;
21
21
  }>;
22
22
  /**
23
23
  * Max height rule - image height validation
24
24
  */
25
- declare const maxHeightRule: SchemaRule<{
25
+ export declare const maxHeightRule: SchemaRule<{
26
26
  maxHeight: number;
27
27
  }>;
28
28
  //#endregion
29
- export { maxHeightRule, maxWidthRule, minHeightRule, minWidthRule };
30
29
  //# sourceMappingURL=dimensions.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dimensions.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/file/dimensions.ts"],"mappings":";;;;;AAMA;cAAa,YAAA,EAAc,UAAU;EAAG,QAAQ;AAAA;AAAA;AAmBhD;;AAnBgD,cAmBnC,YAAA,EAAc,UAAU;EAAG,QAAQ;AAAA;AAmBhD;;;AAAA,cAAa,aAAA,EAAe,UAAU;EAAG,SAAS;AAAA;;;;cAmBrC,aAAA,EAAe,UAAU;EAAG,SAAS;AAAA"}
1
+ {"version":3,"file":"dimensions.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/file/dimensions.ts"],"mappings":";;;;;;qBAMa,cAAc;EAAa;;;;;qBAmB3B,cAAc;EAAa;;;;;qBAmB3B,eAAe;EAAa;;;;;qBAmB5B,eAAe;EAAa"}
@@ -1,18 +1,17 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
-
2
+ import "../../types/index.mjs";
3
3
  //#region ../../packages/seal/src/rules/file/file-size.d.ts
4
4
  /**
5
5
  * Max file size rule
6
6
  */
7
- declare const maxFileSizeRule: SchemaRule<{
7
+ export declare const maxFileSizeRule: SchemaRule<{
8
8
  maxSize: number;
9
9
  }>;
10
10
  /**
11
11
  * Min file size rule
12
12
  */
13
- declare const minFileSizeRule: SchemaRule<{
13
+ export declare const minFileSizeRule: SchemaRule<{
14
14
  minSize: number;
15
15
  }>;
16
16
  //#endregion
17
- export { maxFileSizeRule, minFileSizeRule };
18
17
  //# sourceMappingURL=file-size.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-size.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/file/file-size.ts"],"mappings":";;;;;AAMA;cAAa,eAAA,EAAiB,UAAU;EAAG,OAAO;AAAA;AAAA;AAmBlD;;AAnBkD,cAmBrC,eAAA,EAAiB,UAAU;EAAG,OAAO;AAAA"}
1
+ {"version":3,"file":"file-size.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/file/file-size.ts"],"mappings":";;;;;;qBAMa,iBAAiB;EAAa;;;;;qBAmB9B,iBAAiB;EAAa"}
@@ -0,0 +1,3 @@
1
+ import { maxHeightRule, maxWidthRule, minHeightRule, minWidthRule } from "./dimensions.mjs";
2
+ import { maxFileSizeRule, minFileSizeRule } from "./file-size.mjs";
3
+ export { maxFileSizeRule, maxHeightRule, maxWidthRule, minFileSizeRule, minHeightRule, minWidthRule };
@@ -1,4 +1,4 @@
1
1
  import { maxHeightRule, maxWidthRule, minHeightRule, minWidthRule } from "./dimensions.mjs";
2
2
  import { maxFileSizeRule, minFileSizeRule } from "./file-size.mjs";
3
3
 
4
- export { };
4
+ export { maxFileSizeRule, maxHeightRule, maxWidthRule, minFileSizeRule, minHeightRule, minWidthRule };
@@ -0,0 +1,56 @@
1
+ import { equalRule } from "./core/equal.mjs";
2
+ import { forbiddenRule } from "./core/forbidden.mjs";
3
+ import { presentRule, requiredRule } from "./core/required.mjs";
4
+ import { unionRule } from "./core/union.mjs";
5
+ import { whenRule } from "./core/when.mjs";
6
+ import "./core/index.mjs";
7
+ import { alphaNumericRule, alphaRule, isNumericRule } from "./string/alpha.mjs";
8
+ import { isCreditCardRule } from "./string/credit-card.mjs";
9
+ import { emailRule } from "./string/email.mjs";
10
+ import { UUIDVersion, cuidRule, nanoidRule, ulidRule, uuidRule } from "./string/id-formats.mjs";
11
+ import { ip4Rule, ip6Rule, ipRule, isIP, isIPv4, isIPv6 } from "./string/ip.mjs";
12
+ import { matchesRule } from "./string/matches.mjs";
13
+ import { patternRule } from "./string/pattern.mjs";
14
+ import { containsRule, endsWithRule, notContainsRule, startsWithRule } from "./string/string-comparison.mjs";
15
+ import { strongPasswordRule } from "./string/strong-password-rule.mjs";
16
+ import { urlRule } from "./string/url.mjs";
17
+ import { withoutWhitespaceRule } from "./string/without-whitespace.mjs";
18
+ import "./string/index.mjs";
19
+ import { betweenNumbersRule, evenRule, greaterThanRule, lessThanRule, maxRule, minRule, moduloRule, negativeRule, oddRule, positiveRule } from "./number/number-rules.mjs";
20
+ import "./number/index.mjs";
21
+ import { betweenLengthRule, lengthRule, maxLengthRule, maxWordsRule, minLengthRule, minWordsRule, wordsRule } from "./length/length-rules.mjs";
22
+ import "./length/index.mjs";
23
+ import { sortedArrayRule, uniqueArrayRule } from "./array/array-rules.mjs";
24
+ import "./array/index.mjs";
25
+ import { ageRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenHoursRule, betweenMinutesRule, dateRule, fromHourRule, fromMinuteRule, fromTodayRule, maxAgeRule, maxDateRule, minAgeRule, minDateRule, weekDayRule } from "./date/date.mjs";
26
+ import { afterTodayRule, betweenDatesRule, futureRule, pastRule, todayRule } from "./date/date-comparison-rules.mjs";
27
+ import { businessDayRule, weekdayRule, weekdaysRule, weekendRule } from "./date/date-day-rules.mjs";
28
+ import { afterFieldRule, beforeFieldRule, sameAsFieldDateRule } from "./date/date-field-comparison-rules.mjs";
29
+ import { Month, betweenDaysRule, betweenMonthsRule, betweenTimesRule, betweenYearsRule, maxDayRule, maxMonthRule, maxYearRule, minDayRule, minMonthRule, minYearRule, monthRule, quarterRule, yearRule } from "./date/date-period-rules.mjs";
30
+ import { withinDaysRule, withinFutureDaysRule, withinPastDaysRule } from "./date/date-relative-rules.mjs";
31
+ import { betweenAgeRule, birthdayRule, leapYearRule } from "./date/date-special-rules.mjs";
32
+ import "./date/index.mjs";
33
+ import { maxHeightRule, maxWidthRule, minHeightRule, minWidthRule } from "./file/dimensions.mjs";
34
+ import { maxFileSizeRule, minFileSizeRule } from "./file/file-size.mjs";
35
+ import "./file/index.mjs";
36
+ import { colorRule, darkColorRule, hexColorRule, hslColorRule, lightColorRule, rgbColorRule, rgbaColorRule } from "./color/color-rules.mjs";
37
+ import "./color/index.mjs";
38
+ import { requiredIfAllEmptyRule, requiredIfAllNotEmptyRule, requiredIfAnyEmptyRule, requiredIfAnyNotEmptyRule, requiredIfEmptyRule, requiredIfInRule, requiredIfNotEmptyRule, requiredIfNotInRule, requiredIfRule } from "./conditional/required-if-rules.mjs";
39
+ import { requiredUnlessRule } from "./conditional/required-unless-rules.mjs";
40
+ import { requiredWhenRule } from "./conditional/required-when-rule.mjs";
41
+ import { requiredWithAllRule, requiredWithAnyRule, requiredWithRule } from "./conditional/required-with-rules.mjs";
42
+ import { requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule } from "./conditional/required-without-rules.mjs";
43
+ import { presentIfEmptyRule, presentIfInRule, presentIfNotEmptyRule, presentIfNotInRule, presentIfRule } from "./conditional/present-if-rules.mjs";
44
+ import { presentUnlessRule } from "./conditional/present-unless-rules.mjs";
45
+ import { presentWithAllRule, presentWithAnyRule, presentWithRule } from "./conditional/present-with-rules.mjs";
46
+ import { presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule } from "./conditional/present-without-rules.mjs";
47
+ import { forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule } from "./conditional/forbidden-if-rules.mjs";
48
+ import "./conditional/index.mjs";
49
+ import { allowedValuesRule, enumRule, inRule, notAllowedValuesRule } from "./common/enum.mjs";
50
+ import { equalsFieldRule, notEqualsFieldRule } from "./common/equals-field-rules.mjs";
51
+ import { instanceofRule } from "./common/instanceof.mjs";
52
+ import { literalRule } from "./common/literal.mjs";
53
+ import { arrayRule, booleanRule, floatRule, intRule, numberRule, objectRule, plainObjectRule, scalarRule, stringRule } from "./common/type-rules.mjs";
54
+ import { unknownKeyRule } from "./common/unknown-key.mjs";
55
+ import "./common/index.mjs";
56
+ export { Month, UUIDVersion, afterFieldRule, afterTodayRule, ageRule, allowedValuesRule, alphaNumericRule, alphaRule, arrayRule, beforeFieldRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenAgeRule, betweenDatesRule, betweenDaysRule, betweenHoursRule, betweenLengthRule, betweenMinutesRule, betweenMonthsRule, betweenNumbersRule, betweenTimesRule, betweenYearsRule, birthdayRule, booleanRule, businessDayRule, colorRule, containsRule, cuidRule, darkColorRule, dateRule, emailRule, endsWithRule, enumRule, equalRule, equalsFieldRule, evenRule, floatRule, forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule, forbiddenRule, fromHourRule, fromMinuteRule, fromTodayRule, futureRule, greaterThanRule, hexColorRule, hslColorRule, inRule, instanceofRule, intRule, ip4Rule, ip6Rule, ipRule, isCreditCardRule, isIP, isIPv4, isIPv6, isNumericRule, leapYearRule, lengthRule, lessThanRule, lightColorRule, literalRule, matchesRule, maxAgeRule, maxDateRule, maxDayRule, maxFileSizeRule, maxHeightRule, maxLengthRule, maxMonthRule, maxRule, maxWidthRule, maxWordsRule, maxYearRule, minAgeRule, minDateRule, minDayRule, minFileSizeRule, minHeightRule, minLengthRule, minMonthRule, minRule, minWidthRule, minWordsRule, minYearRule, moduloRule, monthRule, nanoidRule, negativeRule, notAllowedValuesRule, notContainsRule, notEqualsFieldRule, numberRule, objectRule, oddRule, pastRule, patternRule, plainObjectRule, positiveRule, presentIfEmptyRule, presentIfInRule, presentIfNotEmptyRule, presentIfNotInRule, presentIfRule, presentRule, presentUnlessRule, presentWithAllRule, presentWithAnyRule, presentWithRule, presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule, quarterRule, requiredIfAllEmptyRule, requiredIfAllNotEmptyRule, requiredIfAnyEmptyRule, requiredIfAnyNotEmptyRule, requiredIfEmptyRule, requiredIfInRule, requiredIfNotEmptyRule, requiredIfNotInRule, requiredIfRule, requiredRule, requiredUnlessRule, requiredWhenRule, requiredWithAllRule, requiredWithAnyRule, requiredWithRule, requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule, rgbColorRule, rgbaColorRule, sameAsFieldDateRule, scalarRule, sortedArrayRule, startsWithRule, stringRule, strongPasswordRule, todayRule, ulidRule, unionRule, uniqueArrayRule, unknownKeyRule, urlRule, uuidRule, weekDayRule, weekdayRule, weekdaysRule, weekendRule, whenRule, withinDaysRule, withinFutureDaysRule, withinPastDaysRule, withoutWhitespaceRule, wordsRule, yearRule };
@@ -54,4 +54,4 @@ import { arrayRule, booleanRule, floatRule, intRule, numberRule, objectRule, pla
54
54
  import { unknownKeyRule } from "./common/unknown-key.mjs";
55
55
  import "./common/index.mjs";
56
56
 
57
- export { };
57
+ export { afterFieldRule, afterTodayRule, ageRule, allowedValuesRule, alphaNumericRule, alphaRule, arrayRule, beforeFieldRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenAgeRule, betweenDatesRule, betweenDaysRule, betweenHoursRule, betweenLengthRule, betweenMinutesRule, betweenMonthsRule, betweenNumbersRule, betweenTimesRule, betweenYearsRule, birthdayRule, booleanRule, businessDayRule, colorRule, containsRule, cuidRule, darkColorRule, dateRule, emailRule, endsWithRule, enumRule, equalRule, equalsFieldRule, evenRule, floatRule, forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule, forbiddenRule, fromHourRule, fromMinuteRule, fromTodayRule, futureRule, greaterThanRule, hexColorRule, hslColorRule, inRule, instanceofRule, intRule, ip4Rule, ip6Rule, ipRule, isCreditCardRule, isIP, isIPv4, isIPv6, isNumericRule, leapYearRule, lengthRule, lessThanRule, lightColorRule, literalRule, matchesRule, maxAgeRule, maxDateRule, maxDayRule, maxFileSizeRule, maxHeightRule, maxLengthRule, maxMonthRule, maxRule, maxWidthRule, maxWordsRule, maxYearRule, minAgeRule, minDateRule, minDayRule, minFileSizeRule, minHeightRule, minLengthRule, minMonthRule, minRule, minWidthRule, minWordsRule, minYearRule, moduloRule, monthRule, nanoidRule, negativeRule, notAllowedValuesRule, notContainsRule, notEqualsFieldRule, numberRule, objectRule, oddRule, pastRule, patternRule, plainObjectRule, positiveRule, presentIfEmptyRule, presentIfInRule, presentIfNotEmptyRule, presentIfNotInRule, presentIfRule, presentRule, presentUnlessRule, presentWithAllRule, presentWithAnyRule, presentWithRule, presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule, quarterRule, requiredIfAllEmptyRule, requiredIfAllNotEmptyRule, requiredIfAnyEmptyRule, requiredIfAnyNotEmptyRule, requiredIfEmptyRule, requiredIfInRule, requiredIfNotEmptyRule, requiredIfNotInRule, requiredIfRule, requiredRule, requiredUnlessRule, requiredWhenRule, requiredWithAllRule, requiredWithAnyRule, requiredWithRule, requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule, rgbColorRule, rgbaColorRule, sameAsFieldDateRule, scalarRule, sortedArrayRule, startsWithRule, stringRule, strongPasswordRule, todayRule, ulidRule, unionRule, uniqueArrayRule, unknownKeyRule, urlRule, uuidRule, weekDayRule, weekdayRule, weekdaysRule, weekendRule, whenRule, withinDaysRule, withinFutureDaysRule, withinPastDaysRule, withoutWhitespaceRule, wordsRule, yearRule };
@@ -0,0 +1,2 @@
1
+ import { betweenLengthRule, lengthRule, maxLengthRule, maxWordsRule, minLengthRule, minWordsRule, wordsRule } from "./length-rules.mjs";
2
+ export { betweenLengthRule, lengthRule, maxLengthRule, maxWordsRule, minLengthRule, minWordsRule, wordsRule };
@@ -1,3 +1,3 @@
1
1
  import { betweenLengthRule, lengthRule, maxLengthRule, maxWordsRule, minLengthRule, minWordsRule, wordsRule } from "./length-rules.mjs";
2
2
 
3
- export { };
3
+ export { betweenLengthRule, lengthRule, maxLengthRule, maxWordsRule, minLengthRule, minWordsRule, wordsRule };
@@ -1,25 +1,25 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
-
2
+ import "../../types/index.mjs";
3
3
  //#region ../../packages/seal/src/rules/length/length-rules.d.ts
4
4
  /**
5
5
  * Min length rule - validates minimum length
6
6
  * Works for any value with a length property (strings, arrays, etc.)
7
7
  */
8
- declare const minLengthRule: SchemaRule<{
8
+ export declare const minLengthRule: SchemaRule<{
9
9
  minLength: number;
10
10
  }>;
11
11
  /**
12
12
  * Max length rule - validates maximum length
13
13
  * Works for any value with a length property (strings, arrays, etc.)
14
14
  */
15
- declare const maxLengthRule: SchemaRule<{
15
+ export declare const maxLengthRule: SchemaRule<{
16
16
  maxLength: number;
17
17
  }>;
18
18
  /**
19
19
  * Between length rule - validates length is between min and max (inclusive)
20
20
  * Works for any value with a length property (strings, arrays, etc.)
21
21
  */
22
- declare const betweenLengthRule: SchemaRule<{
22
+ export declare const betweenLengthRule: SchemaRule<{
23
23
  minLength: number;
24
24
  maxLength: number;
25
25
  }>;
@@ -27,27 +27,26 @@ declare const betweenLengthRule: SchemaRule<{
27
27
  * Length rule - validates exact length
28
28
  * Works for any value with a length property (strings, arrays, etc.)
29
29
  */
30
- declare const lengthRule: SchemaRule<{
30
+ export declare const lengthRule: SchemaRule<{
31
31
  length: number;
32
32
  }>;
33
33
  /**
34
34
  * Min words rule - validates minimum word count
35
35
  */
36
- declare const minWordsRule: SchemaRule<{
36
+ export declare const minWordsRule: SchemaRule<{
37
37
  minWords: number;
38
38
  }>;
39
39
  /**
40
40
  * Max words rule - validates maximum word count
41
41
  */
42
- declare const maxWordsRule: SchemaRule<{
42
+ export declare const maxWordsRule: SchemaRule<{
43
43
  maxWords: number;
44
44
  }>;
45
45
  /**
46
46
  * Words rule - validates exact word count
47
47
  */
48
- declare const wordsRule: SchemaRule<{
48
+ export declare const wordsRule: SchemaRule<{
49
49
  words: number;
50
50
  }>;
51
51
  //#endregion
52
- export { betweenLengthRule, lengthRule, maxLengthRule, maxWordsRule, minLengthRule, minWordsRule, wordsRule };
53
52
  //# sourceMappingURL=length-rules.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"length-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/length/length-rules.ts"],"mappings":";;;;;AAOA;;cAAa,aAAA,EAAe,UAAU;EAAG,SAAS;AAAA;AAoBlD;;;;AAAA,cAAa,aAAA,EAAe,UAAU;EAAG,SAAS;AAAA;;;;;cAoBrC,iBAAA,EAAmB,UAAU;EACxC,SAAA;EACA,SAAA;AAAA;;;;AAsB0C;cAA/B,UAAA,EAAY,UAAU;EAAG,MAAM;AAAA;;AAmBI;AAiBhD;cAjBa,YAAA,EAAc,UAAU;EAAG,QAAQ;AAAA;AAiBA;AAiBhD;;AAjBgD,cAAnC,YAAA,EAAc,UAAU;EAAG,QAAQ;AAAA;;;;cAiBnC,SAAA,EAAW,UAAU;EAAG,KAAK;AAAA"}
1
+ {"version":3,"file":"length-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/length/length-rules.ts"],"mappings":";;;;;;;qBAOa,eAAe;EAAa;;;;;;qBAoB5B,eAAe;EAAa;;;;;;qBAoB5B,mBAAmB;EAC9B;EACA;;;;;;qBAsBW,YAAY;EAAa;;;;;qBAmBzB,cAAc;EAAa;;;;;qBAiB3B,cAAc;EAAa;;;;;qBAiB3B,WAAW;EAAa"}
@@ -0,0 +1,2 @@
1
+ import { betweenNumbersRule, evenRule, greaterThanRule, lessThanRule, maxRule, minRule, moduloRule, negativeRule, oddRule, positiveRule } from "./number-rules.mjs";
2
+ export { betweenNumbersRule, evenRule, greaterThanRule, lessThanRule, maxRule, minRule, moduloRule, negativeRule, oddRule, positiveRule };
@@ -1,3 +1,3 @@
1
1
  import { betweenNumbersRule, evenRule, greaterThanRule, lessThanRule, maxRule, minRule, moduloRule, negativeRule, oddRule, positiveRule } from "./number-rules.mjs";
2
2
 
3
- export { };
3
+ export { betweenNumbersRule, evenRule, greaterThanRule, lessThanRule, maxRule, minRule, moduloRule, negativeRule, oddRule, positiveRule };
@@ -1,11 +1,11 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
-
2
+ import "../../types/index.mjs";
3
3
  //#region ../../packages/seal/src/rules/number/number-rules.d.ts
4
4
  /**
5
5
  * Min rule - value must be equal or greater than minimum
6
6
  * Supports field names with sibling scope
7
7
  */
8
- declare const minRule: SchemaRule<{
8
+ export declare const minRule: SchemaRule<{
9
9
  min: number | string;
10
10
  scope?: "global" | "sibling";
11
11
  }>;
@@ -13,7 +13,7 @@ declare const minRule: SchemaRule<{
13
13
  * Max rule - value must be equal or less than maximum
14
14
  * Supports field names with sibling scope
15
15
  */
16
- declare const maxRule: SchemaRule<{
16
+ export declare const maxRule: SchemaRule<{
17
17
  max: number | string;
18
18
  scope?: "global" | "sibling";
19
19
  }>;
@@ -21,7 +21,7 @@ declare const maxRule: SchemaRule<{
21
21
  * Greater than rule - value must be strictly greater than minimum
22
22
  * Supports field names with sibling scope
23
23
  */
24
- declare const greaterThanRule: SchemaRule<{
24
+ export declare const greaterThanRule: SchemaRule<{
25
25
  value: number | string;
26
26
  scope?: "global" | "sibling";
27
27
  }>;
@@ -29,41 +29,40 @@ declare const greaterThanRule: SchemaRule<{
29
29
  * Less than rule - value must be strictly less than maximum
30
30
  * Supports field names with sibling scope
31
31
  */
32
- declare const lessThanRule: SchemaRule<{
32
+ export declare const lessThanRule: SchemaRule<{
33
33
  value: number | string;
34
34
  scope?: "global" | "sibling";
35
35
  }>;
36
36
  /**
37
37
  * Positive rule - value must be greater than 0
38
38
  */
39
- declare const positiveRule: SchemaRule;
39
+ export declare const positiveRule: SchemaRule;
40
40
  /**
41
41
  * Negative rule - value must be less than 0
42
42
  */
43
- declare const negativeRule: SchemaRule;
43
+ export declare const negativeRule: SchemaRule;
44
44
  /**
45
45
  * Odd rule - value must be an odd number
46
46
  */
47
- declare const oddRule: SchemaRule;
47
+ export declare const oddRule: SchemaRule;
48
48
  /**
49
49
  * Even rule - value must be an even number
50
50
  */
51
- declare const evenRule: SchemaRule;
51
+ export declare const evenRule: SchemaRule;
52
52
  /**
53
53
  * Modulo rule - value must be divisible by given number
54
54
  */
55
- declare const moduloRule: SchemaRule<{
55
+ export declare const moduloRule: SchemaRule<{
56
56
  value: number;
57
57
  }>;
58
58
  /**
59
59
  * Between rule - value must be between the given two numbers (Inclusive)
60
60
  * Supports field names with sibling scope
61
61
  */
62
- declare const betweenNumbersRule: SchemaRule<{
62
+ export declare const betweenNumbersRule: SchemaRule<{
63
63
  min: number | string;
64
64
  max: number | string;
65
65
  scope?: "global" | "sibling";
66
66
  }>;
67
67
  //#endregion
68
- export { betweenNumbersRule, evenRule, greaterThanRule, lessThanRule, maxRule, minRule, moduloRule, negativeRule, oddRule, positiveRule };
69
68
  //# sourceMappingURL=number-rules.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"number-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/number/number-rules.ts"],"mappings":";;;;;AAQA;;cAAa,OAAA,EAAS,UAAU;EAC9B,GAAA;EACA,KAAA;AAAA;;;AAAK;AAwCP;cAAa,OAAA,EAAS,UAAU;EAC9B,GAAA;EACA,KAAA;AAAA;;;;AAAK;cAwCM,eAAA,EAAiB,UAAU;EACtC,KAAA;EACA,KAAA;AAAA;;;;;cAwCW,YAAA,EAAc,UAAU;EACnC,KAAA;EACA,KAAA;AAAA;;;;cAuCW,YAAA,EAAc,UAU1B;;AAjDM;AAuCP;cAea,YAAA,EAAc,UAU1B;;;AAfA;cAoBY,OAAA,EAAS,UAUrB;;;;cAKY,QAAA,EAAU,UAUtB;AAzBD;;;AAAA,cA8Ba,UAAA,EAAY,UAAU;EAAG,KAAK;AAAA;;;;AAL1C;cAuBY,kBAAA,EAAoB,UAAU;EACzC,GAAA;EACA,GAAA;EACA,KAAA;AAAA"}
1
+ {"version":3,"file":"number-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/number/number-rules.ts"],"mappings":";;;;;;;qBAQa,SAAS;EACpB;EACA;;;;;;qBAwCW,SAAS;EACpB;EACA;;;;;;qBAwCW,iBAAiB;EAC5B;EACA;;;;;;qBAwCW,cAAc;EACzB;EACA;;;;;qBAuCW,cAAc;;;;qBAed,cAAc;;;;qBAed,SAAS;;;;qBAeT,UAAU;;;;qBAeV,YAAY;EAAa;;;;;;qBAkBzB,oBAAoB;EAC/B;EACA;EACA"}
@@ -17,7 +17,8 @@ const minRule = {
17
17
  compareMin = min;
18
18
  this.context.translationParams.min = min;
19
19
  } else {
20
- const fieldValue = get(scope === "sibling" ? context.parent : context.allValues, min);
20
+ const source = scope === "sibling" ? context.parent : context.allValues;
21
+ const fieldValue = get(source, min);
21
22
  if (fieldValue === void 0) return VALID_RULE;
22
23
  this.context.translatableParams.min = min;
23
24
  compareMin = Number(fieldValue);
@@ -41,7 +42,8 @@ const maxRule = {
41
42
  compareMax = max;
42
43
  this.context.translationParams.max = max;
43
44
  } else {
44
- const fieldValue = get(scope === "sibling" ? context.parent : context.allValues, max);
45
+ const source = scope === "sibling" ? context.parent : context.allValues;
46
+ const fieldValue = get(source, max);
45
47
  if (fieldValue === void 0) return VALID_RULE;
46
48
  this.context.translatableParams.max = max;
47
49
  compareMax = Number(fieldValue);
@@ -65,7 +67,8 @@ const greaterThanRule = {
65
67
  compareNumber = compareValue;
66
68
  this.context.translationParams.value = compareValue;
67
69
  } else {
68
- const fieldValue = get(scope === "sibling" ? context.parent : context.allValues, compareValue);
70
+ const source = scope === "sibling" ? context.parent : context.allValues;
71
+ const fieldValue = get(source, compareValue);
69
72
  if (fieldValue === void 0) return VALID_RULE;
70
73
  this.context.translatableParams.value = compareValue;
71
74
  compareNumber = Number(fieldValue);
@@ -89,7 +92,8 @@ const lessThanRule = {
89
92
  compareNumber = compareValue;
90
93
  this.context.translationParams.value = compareValue;
91
94
  } else {
92
- const fieldValue = get(scope === "sibling" ? context.parent : context.allValues, compareValue);
95
+ const source = scope === "sibling" ? context.parent : context.allValues;
96
+ const fieldValue = get(source, compareValue);
93
97
  if (fieldValue === void 0) return VALID_RULE;
94
98
  this.context.translatableParams.value = compareValue;
95
99
  compareNumber = Number(fieldValue);
@@ -169,7 +173,8 @@ const betweenNumbersRule = {
169
173
  compareMin = min;
170
174
  this.context.translationParams.min = min;
171
175
  } else {
172
- const fieldValue = get(scope === "sibling" ? context.parent : context.allValues, min);
176
+ const source = scope === "sibling" ? context.parent : context.allValues;
177
+ const fieldValue = get(source, min);
173
178
  if (fieldValue === void 0) return VALID_RULE;
174
179
  this.context.translatableParams.min = min;
175
180
  compareMin = Number(fieldValue);
@@ -180,7 +185,8 @@ const betweenNumbersRule = {
180
185
  compareMax = max;
181
186
  this.context.translationParams.max = max;
182
187
  } else {
183
- const fieldValue = get(scope === "sibling" ? context.parent : context.allValues, max);
188
+ const source = scope === "sibling" ? context.parent : context.allValues;
189
+ const fieldValue = get(source, max);
184
190
  if (fieldValue === void 0) return VALID_RULE;
185
191
  this.context.translatableParams.max = max;
186
192
  compareMax = Number(fieldValue);