@warlock.js/seal 5.29.0 → 5.30.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 (430) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +2 -0
  3. package/cjs/index.cjs +37 -30
  4. package/cjs/index.cjs.map +1 -1
  5. package/cjs/{object-DubGC-xu.cjs → object--LXRt5RF.cjs} +10 -8
  6. package/cjs/object--LXRt5RF.cjs.map +1 -0
  7. package/cjs/object.cjs +2 -2
  8. package/cjs/{required-methods-BOVNRtci.cjs → required-methods-DYsRO9aZ.cjs} +97 -68
  9. package/cjs/required-methods-DYsRO9aZ.cjs.map +1 -0
  10. package/cjs/{string-DpDpgefH.cjs → string-DsqnKoSB.cjs} +6 -6
  11. package/cjs/string-DsqnKoSB.cjs.map +1 -0
  12. package/cjs/string.cjs +2 -2
  13. package/esm/config.d.mts +2 -1
  14. package/esm/config.d.mts.map +1 -1
  15. package/esm/config.mjs +1 -1
  16. package/esm/config.mjs.map +1 -1
  17. package/esm/factory/validate.d.mts +9 -6
  18. package/esm/factory/validate.d.mts.map +1 -1
  19. package/esm/factory/validate.mjs +12 -4
  20. package/esm/factory/validate.mjs.map +1 -1
  21. package/esm/factory/validators.d.mts +5 -5
  22. package/esm/factory/validators.d.mts.map +1 -1
  23. package/esm/factory/validators.mjs +1 -1
  24. package/esm/factory/validators.mjs.map +1 -1
  25. package/esm/helpers/date-helpers.d.mts +1 -1
  26. package/esm/helpers/date-helpers.d.mts.map +1 -1
  27. package/esm/helpers/date-helpers.mjs +1 -1
  28. package/esm/helpers/date-helpers.mjs.map +1 -1
  29. package/esm/helpers/file.utils.d.mts +1 -1
  30. package/esm/helpers/file.utils.d.mts.map +1 -1
  31. package/esm/helpers/file.utils.mjs +1 -1
  32. package/esm/helpers/file.utils.mjs.map +1 -1
  33. package/esm/helpers/get-field-value.d.mts +2 -1
  34. package/esm/helpers/get-field-value.d.mts.map +1 -1
  35. package/esm/helpers/get-field-value.mjs +1 -1
  36. package/esm/helpers/get-field-value.mjs.map +1 -1
  37. package/esm/helpers/is-empty-value.mjs +1 -1
  38. package/esm/helpers/is-empty-value.mjs.map +1 -1
  39. package/esm/helpers/path-helpers.d.mts +1 -1
  40. package/esm/helpers/path-helpers.d.mts.map +1 -1
  41. package/esm/helpers/path-helpers.mjs +1 -1
  42. package/esm/helpers/path-helpers.mjs.map +1 -1
  43. package/esm/helpers/validation-helpers.d.mts +2 -1
  44. package/esm/helpers/validation-helpers.d.mts.map +1 -1
  45. package/esm/helpers/validation-helpers.mjs +1 -1
  46. package/esm/helpers/validation-helpers.mjs.map +1 -1
  47. package/esm/index.d.mts +3 -3
  48. package/esm/mutators/array-mutators.d.mts +2 -1
  49. package/esm/mutators/array-mutators.d.mts.map +1 -1
  50. package/esm/mutators/array-mutators.mjs +1 -1
  51. package/esm/mutators/array-mutators.mjs.map +1 -1
  52. package/esm/mutators/boolean-mutators.d.mts +2 -1
  53. package/esm/mutators/boolean-mutators.d.mts.map +1 -1
  54. package/esm/mutators/boolean-mutators.mjs +1 -1
  55. package/esm/mutators/boolean-mutators.mjs.map +1 -1
  56. package/esm/mutators/date-mutators.d.mts +2 -1
  57. package/esm/mutators/date-mutators.d.mts.map +1 -1
  58. package/esm/mutators/date-mutators.mjs +1 -1
  59. package/esm/mutators/date-mutators.mjs.map +1 -1
  60. package/esm/mutators/number-mutators.d.mts +2 -1
  61. package/esm/mutators/number-mutators.d.mts.map +1 -1
  62. package/esm/mutators/number-mutators.mjs +1 -1
  63. package/esm/mutators/number-mutators.mjs.map +1 -1
  64. package/esm/mutators/object-mutators.d.mts +2 -1
  65. package/esm/mutators/object-mutators.d.mts.map +1 -1
  66. package/esm/mutators/object-mutators.mjs +1 -1
  67. package/esm/mutators/object-mutators.mjs.map +1 -1
  68. package/esm/mutators/scalar-mutators.d.mts +2 -1
  69. package/esm/mutators/scalar-mutators.d.mts.map +1 -1
  70. package/esm/mutators/scalar-mutators.mjs +1 -1
  71. package/esm/mutators/scalar-mutators.mjs.map +1 -1
  72. package/esm/mutators/string-mutators.d.mts +2 -1
  73. package/esm/mutators/string-mutators.d.mts.map +1 -1
  74. package/esm/mutators/string-mutators.mjs +1 -1
  75. package/esm/mutators/string-mutators.mjs.map +1 -1
  76. package/esm/object.d.mts +1 -1
  77. package/esm/object.d.mts.map +1 -1
  78. package/esm/object.mjs +1 -1
  79. package/esm/object.mjs.map +1 -1
  80. package/esm/plugins/plugin-system.d.mts +1 -1
  81. package/esm/plugins/plugin-system.d.mts.map +1 -1
  82. package/esm/plugins/plugin-system.mjs +1 -1
  83. package/esm/plugins/plugin-system.mjs.map +1 -1
  84. package/esm/rules/array/array-rules.d.mts +2 -1
  85. package/esm/rules/array/array-rules.d.mts.map +1 -1
  86. package/esm/rules/array/array-rules.mjs +1 -1
  87. package/esm/rules/array/array-rules.mjs.map +1 -1
  88. package/esm/rules/color/color-rules.d.mts +2 -1
  89. package/esm/rules/color/color-rules.d.mts.map +1 -1
  90. package/esm/rules/color/color-rules.mjs +1 -1
  91. package/esm/rules/color/color-rules.mjs.map +1 -1
  92. package/esm/rules/common/enum.d.mts +2 -1
  93. package/esm/rules/common/enum.d.mts.map +1 -1
  94. package/esm/rules/common/enum.mjs +1 -1
  95. package/esm/rules/common/enum.mjs.map +1 -1
  96. package/esm/rules/common/equals-field-rules.d.mts +2 -1
  97. package/esm/rules/common/equals-field-rules.d.mts.map +1 -1
  98. package/esm/rules/common/equals-field-rules.mjs +1 -1
  99. package/esm/rules/common/equals-field-rules.mjs.map +1 -1
  100. package/esm/rules/common/instanceof.d.mts +2 -1
  101. package/esm/rules/common/instanceof.d.mts.map +1 -1
  102. package/esm/rules/common/instanceof.mjs +1 -1
  103. package/esm/rules/common/instanceof.mjs.map +1 -1
  104. package/esm/rules/common/literal.d.mts +2 -1
  105. package/esm/rules/common/literal.d.mts.map +1 -1
  106. package/esm/rules/common/literal.mjs +1 -1
  107. package/esm/rules/common/literal.mjs.map +1 -1
  108. package/esm/rules/common/type-rules.d.mts +2 -1
  109. package/esm/rules/common/type-rules.d.mts.map +1 -1
  110. package/esm/rules/common/type-rules.mjs +1 -1
  111. package/esm/rules/common/type-rules.mjs.map +1 -1
  112. package/esm/rules/common/unknown-key.d.mts +2 -1
  113. package/esm/rules/common/unknown-key.d.mts.map +1 -1
  114. package/esm/rules/common/unknown-key.mjs +1 -1
  115. package/esm/rules/common/unknown-key.mjs.map +1 -1
  116. package/esm/rules/conditional/forbidden-if-rules.d.mts +2 -1
  117. package/esm/rules/conditional/forbidden-if-rules.d.mts.map +1 -1
  118. package/esm/rules/conditional/forbidden-if-rules.mjs +1 -1
  119. package/esm/rules/conditional/forbidden-if-rules.mjs.map +1 -1
  120. package/esm/rules/conditional/present-if-rules.d.mts +2 -1
  121. package/esm/rules/conditional/present-if-rules.d.mts.map +1 -1
  122. package/esm/rules/conditional/present-if-rules.mjs +1 -1
  123. package/esm/rules/conditional/present-if-rules.mjs.map +1 -1
  124. package/esm/rules/conditional/present-unless-rules.d.mts +2 -1
  125. package/esm/rules/conditional/present-unless-rules.d.mts.map +1 -1
  126. package/esm/rules/conditional/present-unless-rules.mjs +1 -1
  127. package/esm/rules/conditional/present-unless-rules.mjs.map +1 -1
  128. package/esm/rules/conditional/present-with-rules.d.mts +2 -1
  129. package/esm/rules/conditional/present-with-rules.d.mts.map +1 -1
  130. package/esm/rules/conditional/present-with-rules.mjs +1 -1
  131. package/esm/rules/conditional/present-with-rules.mjs.map +1 -1
  132. package/esm/rules/conditional/present-without-rules.d.mts +2 -1
  133. package/esm/rules/conditional/present-without-rules.d.mts.map +1 -1
  134. package/esm/rules/conditional/present-without-rules.mjs +1 -1
  135. package/esm/rules/conditional/present-without-rules.mjs.map +1 -1
  136. package/esm/rules/conditional/required-if-rules.d.mts +2 -1
  137. package/esm/rules/conditional/required-if-rules.d.mts.map +1 -1
  138. package/esm/rules/conditional/required-if-rules.mjs +1 -1
  139. package/esm/rules/conditional/required-if-rules.mjs.map +1 -1
  140. package/esm/rules/conditional/required-unless-rules.d.mts +2 -1
  141. package/esm/rules/conditional/required-unless-rules.d.mts.map +1 -1
  142. package/esm/rules/conditional/required-unless-rules.mjs +1 -1
  143. package/esm/rules/conditional/required-unless-rules.mjs.map +1 -1
  144. package/esm/rules/conditional/required-when-rule.d.mts +2 -1
  145. package/esm/rules/conditional/required-when-rule.d.mts.map +1 -1
  146. package/esm/rules/conditional/required-when-rule.mjs +1 -1
  147. package/esm/rules/conditional/required-when-rule.mjs.map +1 -1
  148. package/esm/rules/conditional/required-with-rules.d.mts +2 -1
  149. package/esm/rules/conditional/required-with-rules.d.mts.map +1 -1
  150. package/esm/rules/conditional/required-with-rules.mjs +1 -1
  151. package/esm/rules/conditional/required-with-rules.mjs.map +1 -1
  152. package/esm/rules/conditional/required-without-rules.d.mts +2 -1
  153. package/esm/rules/conditional/required-without-rules.d.mts.map +1 -1
  154. package/esm/rules/conditional/required-without-rules.mjs +1 -1
  155. package/esm/rules/conditional/required-without-rules.mjs.map +1 -1
  156. package/esm/rules/core/equal.d.mts +2 -1
  157. package/esm/rules/core/equal.d.mts.map +1 -1
  158. package/esm/rules/core/equal.mjs +1 -1
  159. package/esm/rules/core/equal.mjs.map +1 -1
  160. package/esm/rules/core/forbidden.d.mts +2 -1
  161. package/esm/rules/core/forbidden.d.mts.map +1 -1
  162. package/esm/rules/core/forbidden.mjs +1 -1
  163. package/esm/rules/core/forbidden.mjs.map +1 -1
  164. package/esm/rules/core/required.d.mts +2 -1
  165. package/esm/rules/core/required.d.mts.map +1 -1
  166. package/esm/rules/core/required.mjs +1 -1
  167. package/esm/rules/core/required.mjs.map +1 -1
  168. package/esm/rules/core/union.d.mts +1 -1
  169. package/esm/rules/core/union.d.mts.map +1 -1
  170. package/esm/rules/core/union.mjs +3 -1
  171. package/esm/rules/core/union.mjs.map +1 -1
  172. package/esm/rules/core/when.d.mts +2 -1
  173. package/esm/rules/core/when.d.mts.map +1 -1
  174. package/esm/rules/core/when.mjs +1 -1
  175. package/esm/rules/core/when.mjs.map +1 -1
  176. package/esm/rules/date/date-comparison-rules.d.mts +2 -1
  177. package/esm/rules/date/date-comparison-rules.d.mts.map +1 -1
  178. package/esm/rules/date/date-comparison-rules.mjs +1 -1
  179. package/esm/rules/date/date-comparison-rules.mjs.map +1 -1
  180. package/esm/rules/date/date-day-rules.d.mts +2 -1
  181. package/esm/rules/date/date-day-rules.d.mts.map +1 -1
  182. package/esm/rules/date/date-day-rules.mjs +1 -1
  183. package/esm/rules/date/date-day-rules.mjs.map +1 -1
  184. package/esm/rules/date/date-field-comparison-rules.d.mts +2 -1
  185. package/esm/rules/date/date-field-comparison-rules.d.mts.map +1 -1
  186. package/esm/rules/date/date-field-comparison-rules.mjs +1 -1
  187. package/esm/rules/date/date-field-comparison-rules.mjs.map +1 -1
  188. package/esm/rules/date/date-period-rules.d.mts +2 -1
  189. package/esm/rules/date/date-period-rules.d.mts.map +1 -1
  190. package/esm/rules/date/date-period-rules.mjs +1 -1
  191. package/esm/rules/date/date-period-rules.mjs.map +1 -1
  192. package/esm/rules/date/date-relative-rules.d.mts +2 -1
  193. package/esm/rules/date/date-relative-rules.d.mts.map +1 -1
  194. package/esm/rules/date/date-relative-rules.mjs +1 -1
  195. package/esm/rules/date/date-relative-rules.mjs.map +1 -1
  196. package/esm/rules/date/date-special-rules.d.mts +2 -1
  197. package/esm/rules/date/date-special-rules.d.mts.map +1 -1
  198. package/esm/rules/date/date-special-rules.mjs +1 -1
  199. package/esm/rules/date/date-special-rules.mjs.map +1 -1
  200. package/esm/rules/date/date.d.mts +2 -1
  201. package/esm/rules/date/date.d.mts.map +1 -1
  202. package/esm/rules/date/date.mjs +1 -1
  203. package/esm/rules/date/date.mjs.map +1 -1
  204. package/esm/rules/file/dimensions.d.mts +2 -1
  205. package/esm/rules/file/dimensions.d.mts.map +1 -1
  206. package/esm/rules/file/dimensions.mjs +1 -1
  207. package/esm/rules/file/dimensions.mjs.map +1 -1
  208. package/esm/rules/file/file-size.d.mts +2 -1
  209. package/esm/rules/file/file-size.d.mts.map +1 -1
  210. package/esm/rules/file/file-size.mjs +1 -1
  211. package/esm/rules/file/file-size.mjs.map +1 -1
  212. package/esm/rules/length/length-rules.d.mts +2 -1
  213. package/esm/rules/length/length-rules.d.mts.map +1 -1
  214. package/esm/rules/length/length-rules.mjs +1 -1
  215. package/esm/rules/length/length-rules.mjs.map +1 -1
  216. package/esm/rules/number/number-rules.d.mts +2 -1
  217. package/esm/rules/number/number-rules.d.mts.map +1 -1
  218. package/esm/rules/number/number-rules.mjs +1 -1
  219. package/esm/rules/number/number-rules.mjs.map +1 -1
  220. package/esm/rules/scalar/accepted-rule.mjs +1 -1
  221. package/esm/rules/scalar/accepted-rule.mjs.map +1 -1
  222. package/esm/rules/scalar/declined-rule.mjs +1 -1
  223. package/esm/rules/scalar/declined-rule.mjs.map +1 -1
  224. package/esm/rules/string/alpha.d.mts +2 -1
  225. package/esm/rules/string/alpha.d.mts.map +1 -1
  226. package/esm/rules/string/alpha.mjs +1 -1
  227. package/esm/rules/string/alpha.mjs.map +1 -1
  228. package/esm/rules/string/credit-card.d.mts +2 -1
  229. package/esm/rules/string/credit-card.d.mts.map +1 -1
  230. package/esm/rules/string/credit-card.mjs +1 -1
  231. package/esm/rules/string/credit-card.mjs.map +1 -1
  232. package/esm/rules/string/email.d.mts +2 -1
  233. package/esm/rules/string/email.d.mts.map +1 -1
  234. package/esm/rules/string/email.mjs +1 -1
  235. package/esm/rules/string/email.mjs.map +1 -1
  236. package/esm/rules/string/id-formats.d.mts +2 -1
  237. package/esm/rules/string/id-formats.d.mts.map +1 -1
  238. package/esm/rules/string/id-formats.mjs +1 -1
  239. package/esm/rules/string/id-formats.mjs.map +1 -1
  240. package/esm/rules/string/ip.d.mts +2 -1
  241. package/esm/rules/string/ip.d.mts.map +1 -1
  242. package/esm/rules/string/ip.mjs +1 -1
  243. package/esm/rules/string/ip.mjs.map +1 -1
  244. package/esm/rules/string/matches.d.mts +2 -1
  245. package/esm/rules/string/matches.d.mts.map +1 -1
  246. package/esm/rules/string/matches.mjs +1 -1
  247. package/esm/rules/string/matches.mjs.map +1 -1
  248. package/esm/rules/string/pattern.d.mts +2 -1
  249. package/esm/rules/string/pattern.d.mts.map +1 -1
  250. package/esm/rules/string/pattern.mjs +1 -1
  251. package/esm/rules/string/pattern.mjs.map +1 -1
  252. package/esm/rules/string/string-comparison.d.mts +2 -1
  253. package/esm/rules/string/string-comparison.d.mts.map +1 -1
  254. package/esm/rules/string/string-comparison.mjs +1 -1
  255. package/esm/rules/string/string-comparison.mjs.map +1 -1
  256. package/esm/rules/string/strong-password-rule.d.mts +2 -1
  257. package/esm/rules/string/strong-password-rule.d.mts.map +1 -1
  258. package/esm/rules/string/strong-password-rule.mjs +1 -1
  259. package/esm/rules/string/strong-password-rule.mjs.map +1 -1
  260. package/esm/rules/string/url.d.mts +2 -1
  261. package/esm/rules/string/url.d.mts.map +1 -1
  262. package/esm/rules/string/url.mjs +1 -1
  263. package/esm/rules/string/url.mjs.map +1 -1
  264. package/esm/rules/string/without-whitespace.d.mts +2 -1
  265. package/esm/rules/string/without-whitespace.d.mts.map +1 -1
  266. package/esm/rules/string/without-whitespace.mjs +1 -1
  267. package/esm/rules/string/without-whitespace.mjs.map +1 -1
  268. package/esm/standard-schema/json-schema.d.mts +1 -1
  269. package/esm/standard-schema/json-schema.d.mts.map +1 -1
  270. package/esm/standard-schema/json-schema.mjs +1 -1
  271. package/esm/standard-schema/json-schema.mjs.map +1 -1
  272. package/esm/standard-schema/map-result.d.mts +2 -1
  273. package/esm/standard-schema/map-result.d.mts.map +1 -1
  274. package/esm/standard-schema/map-result.mjs +1 -1
  275. package/esm/standard-schema/map-result.mjs.map +1 -1
  276. package/esm/standard-schema/types.d.mts +1 -1
  277. package/esm/standard-schema/types.d.mts.map +1 -1
  278. package/esm/string.d.mts +1 -1
  279. package/esm/string.d.mts.map +1 -1
  280. package/esm/string.mjs +1 -1
  281. package/esm/string.mjs.map +1 -1
  282. package/esm/types/conditional-types.d.mts +1 -1
  283. package/esm/types/conditional-types.d.mts.map +1 -1
  284. package/esm/types/context-types.d.mts +8 -2
  285. package/esm/types/context-types.d.mts.map +1 -1
  286. package/esm/types/data-transformer-types.d.mts +1 -1
  287. package/esm/types/data-transformer-types.d.mts.map +1 -1
  288. package/esm/types/date-types.d.mts +1 -1
  289. package/esm/types/date-types.d.mts.map +1 -1
  290. package/esm/types/date-types.mjs +1 -1
  291. package/esm/types/date-types.mjs.map +1 -1
  292. package/esm/types/file.types.d.mts +1 -1
  293. package/esm/types/file.types.d.mts.map +1 -1
  294. package/esm/types/inference-types.d.mts +21 -4
  295. package/esm/types/inference-types.d.mts.map +1 -1
  296. package/esm/types/mutator-types.d.mts +1 -1
  297. package/esm/types/mutator-types.d.mts.map +1 -1
  298. package/esm/types/result-types.d.mts +26 -2
  299. package/esm/types/result-types.d.mts.map +1 -1
  300. package/esm/types/rule-types.d.mts +1 -1
  301. package/esm/types/rule-types.d.mts.map +1 -1
  302. package/esm/types/schema-types.d.mts +1 -1
  303. package/esm/types/schema-types.d.mts.map +1 -1
  304. package/esm/validators/any-validator.d.mts +1 -1
  305. package/esm/validators/any-validator.d.mts.map +1 -1
  306. package/esm/validators/any-validator.mjs +1 -1
  307. package/esm/validators/any-validator.mjs.map +1 -1
  308. package/esm/validators/array-validator.d.mts +1 -1
  309. package/esm/validators/array-validator.d.mts.map +1 -1
  310. package/esm/validators/array-validator.mjs +1 -1
  311. package/esm/validators/array-validator.mjs.map +1 -1
  312. package/esm/validators/base-validator.d.mts +8 -1
  313. package/esm/validators/base-validator.d.mts.map +1 -1
  314. package/esm/validators/base-validator.mjs +23 -4
  315. package/esm/validators/base-validator.mjs.map +1 -1
  316. package/esm/validators/boolean-validator.d.mts +1 -1
  317. package/esm/validators/boolean-validator.d.mts.map +1 -1
  318. package/esm/validators/boolean-validator.mjs +1 -1
  319. package/esm/validators/boolean-validator.mjs.map +1 -1
  320. package/esm/validators/computed-validator.d.mts +1 -1
  321. package/esm/validators/computed-validator.d.mts.map +1 -1
  322. package/esm/validators/computed-validator.mjs +1 -1
  323. package/esm/validators/computed-validator.mjs.map +1 -1
  324. package/esm/validators/date-validator.d.mts +2 -1
  325. package/esm/validators/date-validator.d.mts.map +1 -1
  326. package/esm/validators/date-validator.mjs +1 -1
  327. package/esm/validators/date-validator.mjs.map +1 -1
  328. package/esm/validators/discriminated-union-validator.d.mts +8 -2
  329. package/esm/validators/discriminated-union-validator.d.mts.map +1 -1
  330. package/esm/validators/discriminated-union-validator.mjs +6 -1
  331. package/esm/validators/discriminated-union-validator.mjs.map +1 -1
  332. package/esm/validators/float-validator.d.mts +1 -1
  333. package/esm/validators/float-validator.d.mts.map +1 -1
  334. package/esm/validators/float-validator.mjs +1 -1
  335. package/esm/validators/float-validator.mjs.map +1 -1
  336. package/esm/validators/instanceof-validator.d.mts +1 -1
  337. package/esm/validators/instanceof-validator.d.mts.map +1 -1
  338. package/esm/validators/instanceof-validator.mjs +1 -1
  339. package/esm/validators/instanceof-validator.mjs.map +1 -1
  340. package/esm/validators/int-validator.d.mts +1 -1
  341. package/esm/validators/int-validator.d.mts.map +1 -1
  342. package/esm/validators/int-validator.mjs +1 -1
  343. package/esm/validators/int-validator.mjs.map +1 -1
  344. package/esm/validators/lazy-validator.d.mts +1 -1
  345. package/esm/validators/lazy-validator.d.mts.map +1 -1
  346. package/esm/validators/lazy-validator.mjs +1 -1
  347. package/esm/validators/lazy-validator.mjs.map +1 -1
  348. package/esm/validators/literal-validator.d.mts +1 -1
  349. package/esm/validators/literal-validator.d.mts.map +1 -1
  350. package/esm/validators/literal-validator.mjs +5 -2
  351. package/esm/validators/literal-validator.mjs.map +1 -1
  352. package/esm/validators/managed-validator.d.mts +1 -1
  353. package/esm/validators/managed-validator.d.mts.map +1 -1
  354. package/esm/validators/managed-validator.mjs +1 -1
  355. package/esm/validators/managed-validator.mjs.map +1 -1
  356. package/esm/validators/methods/equality-conditional-methods.d.mts +2 -1
  357. package/esm/validators/methods/equality-conditional-methods.d.mts.map +1 -1
  358. package/esm/validators/methods/equality-conditional-methods.mjs +1 -1
  359. package/esm/validators/methods/equality-conditional-methods.mjs.map +1 -1
  360. package/esm/validators/methods/forbidden-methods.d.mts +1 -1
  361. package/esm/validators/methods/forbidden-methods.d.mts.map +1 -1
  362. package/esm/validators/methods/forbidden-methods.mjs +1 -1
  363. package/esm/validators/methods/forbidden-methods.mjs.map +1 -1
  364. package/esm/validators/methods/present-methods.d.mts +1 -1
  365. package/esm/validators/methods/present-methods.d.mts.map +1 -1
  366. package/esm/validators/methods/present-methods.mjs +1 -1
  367. package/esm/validators/methods/present-methods.mjs.map +1 -1
  368. package/esm/validators/methods/required-methods.d.mts +2 -1
  369. package/esm/validators/methods/required-methods.d.mts.map +1 -1
  370. package/esm/validators/methods/required-methods.mjs +1 -1
  371. package/esm/validators/methods/required-methods.mjs.map +1 -1
  372. package/esm/validators/number-validator.d.mts +1 -1
  373. package/esm/validators/number-validator.d.mts.map +1 -1
  374. package/esm/validators/number-validator.mjs +1 -1
  375. package/esm/validators/number-validator.mjs.map +1 -1
  376. package/esm/validators/numeric-validator.d.mts +1 -1
  377. package/esm/validators/numeric-validator.d.mts.map +1 -1
  378. package/esm/validators/numeric-validator.mjs +1 -1
  379. package/esm/validators/numeric-validator.mjs.map +1 -1
  380. package/esm/validators/object-validator.d.mts +1 -1
  381. package/esm/validators/object-validator.d.mts.map +1 -1
  382. package/esm/validators/object-validator.mjs +5 -3
  383. package/esm/validators/object-validator.mjs.map +1 -1
  384. package/esm/validators/primitive-validator.d.mts +1 -1
  385. package/esm/validators/primitive-validator.d.mts.map +1 -1
  386. package/esm/validators/primitive-validator.mjs +1 -1
  387. package/esm/validators/primitive-validator.mjs.map +1 -1
  388. package/esm/validators/record-validator.d.mts +1 -1
  389. package/esm/validators/record-validator.d.mts.map +1 -1
  390. package/esm/validators/record-validator.mjs +1 -1
  391. package/esm/validators/record-validator.mjs.map +1 -1
  392. package/esm/validators/scalar-validator.d.mts +1 -1
  393. package/esm/validators/scalar-validator.d.mts.map +1 -1
  394. package/esm/validators/scalar-validator.mjs +1 -1
  395. package/esm/validators/scalar-validator.mjs.map +1 -1
  396. package/esm/validators/string-validator.d.mts +1 -1
  397. package/esm/validators/string-validator.d.mts.map +1 -1
  398. package/esm/validators/string-validator.mjs +1 -1
  399. package/esm/validators/string-validator.mjs.map +1 -1
  400. package/esm/validators/tuple-validator.d.mts +1 -1
  401. package/esm/validators/tuple-validator.d.mts.map +1 -1
  402. package/esm/validators/tuple-validator.mjs +1 -1
  403. package/esm/validators/tuple-validator.mjs.map +1 -1
  404. package/esm/validators/union-validator.d.mts +1 -1
  405. package/esm/validators/union-validator.d.mts.map +1 -1
  406. package/esm/validators/union-validator.mjs +1 -1
  407. package/esm/validators/union-validator.mjs.map +1 -1
  408. package/llms-full.txt +9 -7
  409. package/package.json +3 -2
  410. package/skills/handle-seal-errors/SKILL.md +4 -6
  411. package/skills/pick-seal-primitive/SKILL.md +4 -0
  412. package/skills/seal-basics/SKILL.md +1 -1
  413. package/cjs/object-DubGC-xu.cjs.map +0 -1
  414. package/cjs/required-methods-BOVNRtci.cjs.map +0 -1
  415. package/cjs/string-DpDpgefH.cjs.map +0 -1
  416. package/esm/helpers/index.d.mts +0 -5
  417. package/esm/mutators/index.d.mts +0 -7
  418. package/esm/rules/array/index.d.mts +0 -1
  419. package/esm/rules/color/index.d.mts +0 -1
  420. package/esm/rules/common/index.d.mts +0 -6
  421. package/esm/rules/conditional/index.d.mts +0 -10
  422. package/esm/rules/core/index.d.mts +0 -5
  423. package/esm/rules/date/index.d.mts +0 -7
  424. package/esm/rules/file/index.d.mts +0 -2
  425. package/esm/rules/index.d.mts +0 -45
  426. package/esm/rules/length/index.d.mts +0 -1
  427. package/esm/rules/number/index.d.mts +0 -1
  428. package/esm/rules/string/index.d.mts +0 -11
  429. package/esm/standard-schema/index.d.mts +0 -3
  430. package/esm/types/index.d.mts +0 -10
@@ -1 +1 @@
1
- {"version":3,"file":"required-if-rules.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/conditional/required-if-rules.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Required if rule - field is required if another field equals a specific value\n * Supports both global and sibling scope\n */\nexport const requiredIfRule: SchemaRule<{\n field: string;\n value: any;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIf\",\n description: \"The field is required if another field equals a specific value\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { value: expectedValue } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field equals the expected value\n if (isEmptyValue(value) && fieldValue === expectedValue) {\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if empty rule - field is required if another field is empty\n * Supports both global and sibling scope\n */\nexport const requiredIfEmptyRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfEmpty\",\n description: \"The field is required if :field is empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field is empty\n if (isEmptyValue(value) && isEmptyValue(fieldValue)) {\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if not empty rule - field is required if another field is not empty\n * Supports both global and sibling scope\n */\nexport const requiredIfNotEmptyRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfNotEmpty\",\n description: \"The field is required if :field is not empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field is not empty\n if (isEmptyValue(value) && !isEmptyValue(fieldValue)) {\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if in rule - field is required if another field's value is in the given array\n * Supports both global and sibling scope\n */\nexport const requiredIfInRule: SchemaRule<{\n field: string;\n values: any[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfIn\",\n description: \"The field is required if :field value is in the given array\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { values } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field's value is in the array\n if (isEmptyValue(value) && values.includes(fieldValue)) {\n this.context.translatableParams.field = this.context.options.field;\n this.context.translationParams.values = this.context.options.values.join(\", \");\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if not in rule - field is required if another field's value is NOT in the given array\n * Supports both global and sibling scope\n */\nexport const requiredIfNotInRule: SchemaRule<{\n field: string;\n values: any[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfNotIn\",\n description: \"The field is required if another field's value is NOT in the given array\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { values } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field's value is NOT in the array\n if (isEmptyValue(value) && !values.includes(fieldValue)) {\n this.context.translatableParams.field = this.context.options.field;\n this.context.translationParams.values = this.context.options.values.join(\", \");\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Get multiple field values based on scope\n */\nfunction getFieldsValues(\n rule: SchemaRule<{ fields: string[]; scope?: \"global\" | \"sibling\" }>,\n context: any,\n): any[] {\n const { fields, scope = \"global\" } = (rule as any).context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n return fields.map((field: string) => get(source, field));\n}\n\n/**\n * Required if all empty rule - field is required if ALL specified fields are empty\n * Supports both global and sibling scope\n */\nexport const requiredIfAllEmptyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfAllEmpty\",\n description: \"The field is required if all :fields are empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValues = getFieldsValues(this, context);\n\n // Field is required if ALL other fields are empty\n const allEmpty = fieldValues.every((v) => isEmptyValue(v));\n if (isEmptyValue(value) && allEmpty) {\n this.context.options.fields.forEach((field) => {\n this.context.translatableParams.field = field;\n });\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if any empty rule - field is required if ANY of the specified fields is empty\n * Supports both global and sibling scope\n */\nexport const requiredIfAnyEmptyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfAnyEmpty\",\n description: \"The field is required if any of the :fields is empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValues = getFieldsValues(this, context);\n\n // Field is required if ANY other field is empty\n const anyEmpty = fieldValues.some((v) => isEmptyValue(v));\n if (isEmptyValue(value) && anyEmpty) {\n this.context.options.fields.forEach((field) => {\n this.context.translatableParams.field = field;\n });\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if all not empty rule - field is required if ALL specified fields are NOT empty\n * Supports both global and sibling scope\n */\nexport const requiredIfAllNotEmptyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfAllNotEmpty\",\n description: \"The field is required if all :fields are not empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValues = getFieldsValues(this, context);\n\n // Field is required if ALL other fields are NOT empty\n const allNotEmpty = fieldValues.every((v) => !isEmptyValue(v));\n if (isEmptyValue(value) && allNotEmpty) {\n this.context.options.fields.forEach((field) => {\n this.context.translatableParams.field = field;\n });\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if any not empty rule - field is required if ANY of the specified fields is NOT empty\n * Supports both global and sibling scope\n */\nexport const requiredIfAnyNotEmptyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfAnyNotEmpty\",\n description: \"The field is required if any of the :fields is not empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValues = getFieldsValues(this, context);\n\n // Field is required if ANY other field is NOT empty\n const anyNotEmpty = fieldValues.some((v) => !isEmptyValue(v));\n if (isEmptyValue(value) && anyNotEmpty) {\n this.context.options.fields.forEach((field) => {\n this.context.translatableParams.field = field;\n });\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":"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"}
1
+ {"version":3,"file":"required-if-rules.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-if-rules.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Required if rule - field is required if another field equals a specific value\n * Supports both global and sibling scope\n */\nexport const requiredIfRule: SchemaRule<{\n field: string;\n value: any;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIf\",\n description: \"The field is required if another field equals a specific value\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { value: expectedValue } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field equals the expected value\n if (isEmptyValue(value) && fieldValue === expectedValue) {\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if empty rule - field is required if another field is empty\n * Supports both global and sibling scope\n */\nexport const requiredIfEmptyRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfEmpty\",\n description: \"The field is required if :field is empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field is empty\n if (isEmptyValue(value) && isEmptyValue(fieldValue)) {\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if not empty rule - field is required if another field is not empty\n * Supports both global and sibling scope\n */\nexport const requiredIfNotEmptyRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfNotEmpty\",\n description: \"The field is required if :field is not empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field is not empty\n if (isEmptyValue(value) && !isEmptyValue(fieldValue)) {\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if in rule - field is required if another field's value is in the given array\n * Supports both global and sibling scope\n */\nexport const requiredIfInRule: SchemaRule<{\n field: string;\n values: any[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfIn\",\n description: \"The field is required if :field value is in the given array\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { values } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field's value is in the array\n if (isEmptyValue(value) && values.includes(fieldValue)) {\n this.context.translatableParams.field = this.context.options.field;\n this.context.translationParams.values = this.context.options.values.join(\", \");\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if not in rule - field is required if another field's value is NOT in the given array\n * Supports both global and sibling scope\n */\nexport const requiredIfNotInRule: SchemaRule<{\n field: string;\n values: any[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfNotIn\",\n description: \"The field is required if another field's value is NOT in the given array\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { values } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field's value is NOT in the array\n if (isEmptyValue(value) && !values.includes(fieldValue)) {\n this.context.translatableParams.field = this.context.options.field;\n this.context.translationParams.values = this.context.options.values.join(\", \");\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Get multiple field values based on scope\n */\nfunction getFieldsValues(\n rule: SchemaRule<{ fields: string[]; scope?: \"global\" | \"sibling\" }>,\n context: any,\n): any[] {\n const { fields, scope = \"global\" } = (rule as any).context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n return fields.map((field: string) => get(source, field));\n}\n\n/**\n * Required if all empty rule - field is required if ALL specified fields are empty\n * Supports both global and sibling scope\n */\nexport const requiredIfAllEmptyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfAllEmpty\",\n description: \"The field is required if all :fields are empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValues = getFieldsValues(this, context);\n\n // Field is required if ALL other fields are empty\n const allEmpty = fieldValues.every((v) => isEmptyValue(v));\n if (isEmptyValue(value) && allEmpty) {\n this.context.options.fields.forEach((field) => {\n this.context.translatableParams.field = field;\n });\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if any empty rule - field is required if ANY of the specified fields is empty\n * Supports both global and sibling scope\n */\nexport const requiredIfAnyEmptyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfAnyEmpty\",\n description: \"The field is required if any of the :fields is empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValues = getFieldsValues(this, context);\n\n // Field is required if ANY other field is empty\n const anyEmpty = fieldValues.some((v) => isEmptyValue(v));\n if (isEmptyValue(value) && anyEmpty) {\n this.context.options.fields.forEach((field) => {\n this.context.translatableParams.field = field;\n });\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if all not empty rule - field is required if ALL specified fields are NOT empty\n * Supports both global and sibling scope\n */\nexport const requiredIfAllNotEmptyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfAllNotEmpty\",\n description: \"The field is required if all :fields are not empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValues = getFieldsValues(this, context);\n\n // Field is required if ALL other fields are NOT empty\n const allNotEmpty = fieldValues.every((v) => !isEmptyValue(v));\n if (isEmptyValue(value) && allNotEmpty) {\n this.context.options.fields.forEach((field) => {\n this.context.translatableParams.field = field;\n });\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required if any not empty rule - field is required if ANY of the specified fields is NOT empty\n * Supports both global and sibling scope\n */\nexport const requiredIfAnyNotEmptyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredIfAnyNotEmpty\",\n description: \"The field is required if any of the :fields is not empty\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValues = getFieldsValues(this, context);\n\n // Field is required if ANY other field is NOT empty\n const anyNotEmpty = fieldValues.some((v) => !isEmptyValue(v));\n if (isEmptyValue(value) && anyNotEmpty) {\n this.context.options.fields.forEach((field) => {\n this.context.translatableParams.field = field;\n });\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;AASA,MAAa,iBAIR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,OAAO,kBAAkB,KAAK,QAAQ;EAC9C,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,aAAa,KAAK,KAAK,eAAe,eAAe;GACvD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,sBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,aAAa,KAAK,KAAK,aAAa,UAAU,GAAG;GACnD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,yBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,aAAa,KAAK,KAAK,CAAC,aAAa,UAAU,GAAG;GACpD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,mBAIR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,WAAW,KAAK,QAAQ;EAChC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,aAAa,KAAK,KAAK,OAAO,SAAS,UAAU,GAAG;GACtD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,KAAK,QAAQ,kBAAkB,SAAS,KAAK,QAAQ,QAAQ,OAAO,KAAK,IAAI;GAC7E,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,sBAIR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,WAAW,KAAK,QAAQ;EAChC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,aAAa,KAAK,KAAK,CAAC,OAAO,SAAS,UAAU,GAAG;GACvD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,KAAK,QAAQ,kBAAkB,SAAS,KAAK,QAAQ,QAAQ,OAAO,KAAK,IAAI;GAC7E,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;AAKA,SAAS,gBACP,MACA,SACO;CACP,MAAM,EAAE,QAAQ,QAAQ,aAAc,KAAa,QAAQ;CAC3D,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;CAC9D,OAAO,OAAO,KAAK,UAAkB,IAAI,QAAQ,KAAK,CAAC;AACzD;;;;;AAMA,MAAa,yBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAIlC,MAAM,WAHc,gBAAgB,MAAM,OAGf,CAAC,CAAC,OAAO,MAAM,aAAa,CAAC,CAAC;EACzD,IAAI,aAAa,KAAK,KAAK,UAAU;GACnC,KAAK,QAAQ,QAAQ,OAAO,SAAS,UAAU;IAC7C,KAAK,QAAQ,mBAAmB,QAAQ;GAC1C,CAAC;GACD,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,yBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAIlC,MAAM,WAHc,gBAAgB,MAAM,OAGf,CAAC,CAAC,MAAM,MAAM,aAAa,CAAC,CAAC;EACxD,IAAI,aAAa,KAAK,KAAK,UAAU;GACnC,KAAK,QAAQ,QAAQ,OAAO,SAAS,UAAU;IAC7C,KAAK,QAAQ,mBAAmB,QAAQ;GAC1C,CAAC;GACD,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,4BAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAIlC,MAAM,cAHc,gBAAgB,MAAM,OAGZ,CAAC,CAAC,OAAO,MAAM,CAAC,aAAa,CAAC,CAAC;EAC7D,IAAI,aAAa,KAAK,KAAK,aAAa;GACtC,KAAK,QAAQ,QAAQ,OAAO,SAAS,UAAU;IAC7C,KAAK,QAAQ,mBAAmB,QAAQ;GAC1C,CAAC;GACD,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,4BAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAIlC,MAAM,cAHc,gBAAgB,MAAM,OAGZ,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;EAC5D,IAAI,aAAa,KAAK,KAAK,aAAa;GACtC,KAAK,QAAQ,QAAQ,OAAO,SAAS,UAAU;IAC7C,KAAK,QAAQ,mBAAmB,QAAQ;GAC1C,CAAC;GACD,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/conditional/required-unless-rules.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/conditional/required-unless-rules.d.ts
3
4
  /**
4
5
  * Required unless rule - field is required unless another field equals a specific value
5
6
  * Supports both global and sibling scope
@@ -1 +1 @@
1
- {"version":3,"file":"required-unless-rules.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/conditional/required-unless-rules.ts"],"mappings":";;;;;AAQA;cAAa,kBAAA,EAAoB,UAAU;EACzC,KAAA;EACA,KAAA;EACA,KAAA;AAAA"}
1
+ {"version":3,"file":"required-unless-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-unless-rules.ts"],"mappings":";;;;;AAQA;;cAAa,kBAAA,EAAoB,UAAU;EACzC,KAAA;EACA,KAAA;EACA,KAAA;AAAA"}
@@ -3,7 +3,7 @@ import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
3
3
  import { getFieldValue } from "../../helpers/get-field-value.mjs";
4
4
  import "../../helpers/index.mjs";
5
5
 
6
- //#region ../seal/src/rules/conditional/required-unless-rules.ts
6
+ //#region ../../packages/seal/src/rules/conditional/required-unless-rules.ts
7
7
  /**
8
8
  * Required unless rule - field is required unless another field equals a specific value
9
9
  * Supports both global and sibling scope
@@ -1 +1 @@
1
- {"version":3,"file":"required-unless-rules.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/conditional/required-unless-rules.ts"],"sourcesContent":["import { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\nimport { isEmptyValue } from \"./../../helpers/is-empty-value\";\n\n/**\n * Required unless rule - field is required unless another field equals a specific value\n * Supports both global and sibling scope\n */\nexport const requiredUnlessRule: SchemaRule<{\n field: string;\n value: any;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredUnless\",\n description: \"The field is required unless another field equals a specific value\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { value: expectedValue } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field is required unless the other field equals the expected value\n if (isEmptyValue(value) && fieldValue !== expectedValue) {\n this.context.translatableParams.field = this.context.options.field;\n this.context.translationParams.value = this.context.options.value;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;AAQA,MAAa,qBAIR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,OAAO,kBAAkB,KAAK,QAAQ;EAC9C,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,aAAa,KAAK,KAAK,eAAe,eAAe;GACvD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,KAAK,QAAQ,kBAAkB,QAAQ,KAAK,QAAQ,QAAQ;GAC5D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"required-unless-rules.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-unless-rules.ts"],"sourcesContent":["import { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\nimport { isEmptyValue } from \"./../../helpers/is-empty-value\";\n\n/**\n * Required unless rule - field is required unless another field equals a specific value\n * Supports both global and sibling scope\n */\nexport const requiredUnlessRule: SchemaRule<{\n field: string;\n value: any;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredUnless\",\n description: \"The field is required unless another field equals a specific value\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { value: expectedValue } = this.context.options;\n const fieldValue = getFieldValue(this, context);\n\n // Field is required unless the other field equals the expected value\n if (isEmptyValue(value) && fieldValue !== expectedValue) {\n this.context.translatableParams.field = this.context.options.field;\n this.context.translationParams.value = this.context.options.value;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;AAQA,MAAa,qBAIR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,OAAO,kBAAkB,KAAK,QAAQ;EAC9C,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,aAAa,KAAK,KAAK,eAAe,eAAe;GACvD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,KAAK,QAAQ,kBAAkB,QAAQ,KAAK,QAAQ,QAAQ;GAC5D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF"}
@@ -1,6 +1,7 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
2
  import { SchemaContext } from "../../types/context-types.mjs";
3
- //#region ../seal/src/rules/conditional/required-when-rule.d.ts
3
+
4
+ //#region ../../packages/seal/src/rules/conditional/required-when-rule.d.ts
4
5
  /**
5
6
  * Required when callback returns true.
6
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"required-when-rule.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/conditional/required-when-rule.ts"],"mappings":";;;;;;;AAiBA;;;;;;;;;cAAa,gBAAA,EAAkB,UAAA;EAC7B,QAAA,GAAW,OAAA,EAAS,aAAA,eAA4B,OAAA;AAAA"}
1
+ {"version":3,"file":"required-when-rule.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-when-rule.ts"],"mappings":";;;;;;;AAiBA;;;;;;;;;;cAAa,gBAAA,EAAkB,UAAA;EAC7B,QAAA,GAAW,OAAA,EAAS,aAAA,eAA4B,OAAA;AAAA"}
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
3
3
  import "../../helpers/index.mjs";
4
4
 
5
- //#region ../seal/src/rules/conditional/required-when-rule.ts
5
+ //#region ../../packages/seal/src/rules/conditional/required-when-rule.ts
6
6
  /**
7
7
  * Required when callback returns true.
8
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"required-when-rule.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/conditional/required-when-rule.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaContext, SchemaRule } from \"../../types\";\n\n/**\n * Required when callback returns true.\n *\n * The callback receives only the SchemaContext (not the value),\n * because \"required\" is about surrounding conditions, not the field itself.\n *\n * @example\n * ```ts\n * v.string().requiredWhen((context) => {\n * return context.allData.notificationMethod === 'email';\n * })\n * ```\n */\nexport const requiredWhenRule: SchemaRule<{\n callback: (context: SchemaContext) => boolean | Promise<boolean>;\n}> = {\n name: \"requiredWhen\",\n defaultErrorMessage: \"The :input is required\",\n requiresValue: false,\n sortOrder: -2,\n async validate(value, context) {\n const shouldBeRequired = await this.context.options.callback?.(context);\n\n if (shouldBeRequired && isEmptyValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,MAAa,mBAER;CACH,MAAM;CACN,qBAAqB;CACrB,eAAe;CACf,WAAW;CACX,MAAM,SAAS,OAAO,SAAS;EAG7B,IAAI,MAF2B,KAAK,QAAQ,QAAQ,WAAW,OAAO,KAE9C,aAAa,KAAK,GACxC,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"required-when-rule.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-when-rule.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaContext, SchemaRule } from \"../../types\";\n\n/**\n * Required when callback returns true.\n *\n * The callback receives only the SchemaContext (not the value),\n * because \"required\" is about surrounding conditions, not the field itself.\n *\n * @example\n * ```ts\n * v.string().requiredWhen((context) => {\n * return context.allData.notificationMethod === 'email';\n * })\n * ```\n */\nexport const requiredWhenRule: SchemaRule<{\n callback: (context: SchemaContext) => boolean | Promise<boolean>;\n}> = {\n name: \"requiredWhen\",\n defaultErrorMessage: \"The :input is required\",\n requiresValue: false,\n sortOrder: -2,\n async validate(value, context) {\n const shouldBeRequired = await this.context.options.callback?.(context);\n\n if (shouldBeRequired && isEmptyValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,MAAa,mBAER;CACH,MAAM;CACN,qBAAqB;CACrB,eAAe;CACf,WAAW;CACX,MAAM,SAAS,OAAO,SAAS;EAG7B,IAAI,MAF2B,KAAK,QAAQ,QAAQ,WAAW,OAAO,KAE9C,aAAa,KAAK,GACxC,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/conditional/required-with-rules.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/conditional/required-with-rules.d.ts
3
4
  /**
4
5
  * Required with rule - field is required if another field is present
5
6
  * Supports both global and sibling scope
@@ -1 +1 @@
1
- {"version":3,"file":"required-with-rules.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/conditional/required-with-rules.ts"],"mappings":";;;;;AASA;cAAa,gBAAA,EAAkB,UAAU;EACvC,KAAA;EACA,KAAA;AAAA;;;;AAAK;cAwBM,mBAAA,EAAqB,UAAU;EAC1C,MAAA;EACA,KAAA;AAAA;;;;;cA2BW,mBAAA,EAAqB,UAAU;EAC1C,MAAA;EACA,KAAA;AAAA"}
1
+ {"version":3,"file":"required-with-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-with-rules.ts"],"mappings":";;;;;AASA;;cAAa,gBAAA,EAAkB,UAAU;EACvC,KAAA;EACA,KAAA;AAAA;;;AAAK;AAwBP;cAAa,mBAAA,EAAqB,UAAU;EAC1C,MAAA;EACA,KAAA;AAAA;;;;AAAK;cA2BM,mBAAA,EAAqB,UAAU;EAC1C,MAAA;EACA,KAAA;AAAA"}
@@ -4,7 +4,7 @@ import { getFieldValue } from "../../helpers/get-field-value.mjs";
4
4
  import "../../helpers/index.mjs";
5
5
  import { get } from "@mongez/reinforcements";
6
6
 
7
- //#region ../seal/src/rules/conditional/required-with-rules.ts
7
+ //#region ../../packages/seal/src/rules/conditional/required-with-rules.ts
8
8
  /**
9
9
  * Required with rule - field is required if another field is present
10
10
  * Supports both global and sibling scope
@@ -1 +1 @@
1
- {"version":3,"file":"required-with-rules.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/conditional/required-with-rules.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Required with rule - field is required if another field is present\n * Supports both global and sibling scope\n */\nexport const requiredWithRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredWith\",\n description: \"The field is required if another field is present\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field is present\n if (isEmptyValue(value) && fieldValue !== undefined) {\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required with all rule - field is required if all specified fields are present\n * Supports both global and sibling scope\n */\nexport const requiredWithAllRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredWithAll\",\n description: \"The field is required if all specified fields are present\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { fields, scope = \"global\" } = this.context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n\n // Check if all fields are present\n const allPresent = fields.every((field) => get(source, field) !== undefined);\n\n // Field is required if all other fields are present\n if (isEmptyValue(value) && allPresent) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required with any rule - field is required if any of the specified fields is present\n * Supports both global and sibling scope\n */\nexport const requiredWithAnyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredWithAny\",\n description: \"The field is required if any of the specified fields is present\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { fields, scope = \"global\" } = this.context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n\n // Check if any field is present\n const anyPresent = fields.some((field) => get(source, field) !== undefined);\n\n // Field is required if any other field is present\n if (isEmptyValue(value) && anyPresent) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;AASA,MAAa,mBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,aAAa,KAAK,KAAK,eAAe,QAAW;GACnD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,sBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,OAAO,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG3E,IAAI,aAAa,KAAK,KAAK,YACzB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;;AAMA,MAAa,sBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,MAAM,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG1E,IAAI,aAAa,KAAK,KAAK,YACzB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"required-with-rules.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-with-rules.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Required with rule - field is required if another field is present\n * Supports both global and sibling scope\n */\nexport const requiredWithRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredWith\",\n description: \"The field is required if another field is present\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field is present\n if (isEmptyValue(value) && fieldValue !== undefined) {\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required with all rule - field is required if all specified fields are present\n * Supports both global and sibling scope\n */\nexport const requiredWithAllRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredWithAll\",\n description: \"The field is required if all specified fields are present\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { fields, scope = \"global\" } = this.context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n\n // Check if all fields are present\n const allPresent = fields.every((field) => get(source, field) !== undefined);\n\n // Field is required if all other fields are present\n if (isEmptyValue(value) && allPresent) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required with any rule - field is required if any of the specified fields is present\n * Supports both global and sibling scope\n */\nexport const requiredWithAnyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredWithAny\",\n description: \"The field is required if any of the specified fields is present\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { fields, scope = \"global\" } = this.context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n\n // Check if any field is present\n const anyPresent = fields.some((field) => get(source, field) !== undefined);\n\n // Field is required if any other field is present\n if (isEmptyValue(value) && anyPresent) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;AASA,MAAa,mBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,aAAa,KAAK,KAAK,eAAe,QAAW;GACnD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,sBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,OAAO,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG3E,IAAI,aAAa,KAAK,KAAK,YACzB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;;AAMA,MAAa,sBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,MAAM,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG1E,IAAI,aAAa,KAAK,KAAK,YACzB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/conditional/required-without-rules.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/conditional/required-without-rules.d.ts
3
4
  /**
4
5
  * Required without rule - field is required if another field is missing
5
6
  * Supports both global and sibling scope
@@ -1 +1 @@
1
- {"version":3,"file":"required-without-rules.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/conditional/required-without-rules.ts"],"mappings":";;;;;AASA;cAAa,mBAAA,EAAqB,UAAU;EAC1C,KAAA;EACA,KAAA;AAAA;;;;AAAK;cAwBM,sBAAA,EAAwB,UAAU;EAC7C,MAAA;EACA,KAAA;AAAA;;;;;cA2BW,sBAAA,EAAwB,UAAU;EAC7C,MAAA;EACA,KAAA;AAAA"}
1
+ {"version":3,"file":"required-without-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-without-rules.ts"],"mappings":";;;;;AASA;;cAAa,mBAAA,EAAqB,UAAU;EAC1C,KAAA;EACA,KAAA;AAAA;;;AAAK;AAwBP;cAAa,sBAAA,EAAwB,UAAU;EAC7C,MAAA;EACA,KAAA;AAAA;;;;AAAK;cA2BM,sBAAA,EAAwB,UAAU;EAC7C,MAAA;EACA,KAAA;AAAA"}
@@ -4,7 +4,7 @@ import { getFieldValue } from "../../helpers/get-field-value.mjs";
4
4
  import "../../helpers/index.mjs";
5
5
  import { get } from "@mongez/reinforcements";
6
6
 
7
- //#region ../seal/src/rules/conditional/required-without-rules.ts
7
+ //#region ../../packages/seal/src/rules/conditional/required-without-rules.ts
8
8
  /**
9
9
  * Required without rule - field is required if another field is missing
10
10
  * Supports both global and sibling scope
@@ -1 +1 @@
1
- {"version":3,"file":"required-without-rules.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/conditional/required-without-rules.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\nimport { isEmptyValue } from \"./../../helpers/is-empty-value\";\n\n/**\n * Required without rule - field is required if another field is missing\n * Supports both global and sibling scope\n */\nexport const requiredWithoutRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredWithout\",\n description: \"The field is required if another field is missing\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field is missing\n if (isEmptyValue(value) && fieldValue === undefined) {\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required without all rule - field is required if all specified fields are missing\n * Supports both global and sibling scope\n */\nexport const requiredWithoutAllRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredWithoutAll\",\n description: \"The field is required if all specified fields are missing\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { fields, scope = \"global\" } = this.context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n\n // Check if all fields are missing\n const allMissing = fields.every((field) => get(source, field) === undefined);\n\n // Field is required if all other fields are missing\n if (isEmptyValue(value) && allMissing) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required without any rule - field is required if any of the specified fields is missing\n * Supports both global and sibling scope\n */\nexport const requiredWithoutAnyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredWithoutAny\",\n description: \"The field is required if any of the specified fields is missing\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { fields, scope = \"global\" } = this.context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n\n // Check if any field is missing\n const anyMissing = fields.some((field) => get(source, field) === undefined);\n\n // Field is required if any other field is missing\n if (isEmptyValue(value) && anyMissing) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;AASA,MAAa,sBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,aAAa,KAAK,KAAK,eAAe,QAAW;GACnD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,yBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,OAAO,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG3E,IAAI,aAAa,KAAK,KAAK,YACzB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;;AAMA,MAAa,yBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,MAAM,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG1E,IAAI,aAAa,KAAK,KAAK,YACzB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"required-without-rules.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/conditional/required-without-rules.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\nimport { isEmptyValue } from \"./../../helpers/is-empty-value\";\n\n/**\n * Required without rule - field is required if another field is missing\n * Supports both global and sibling scope\n */\nexport const requiredWithoutRule: SchemaRule<{\n field: string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredWithout\",\n description: \"The field is required if another field is missing\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n\n // Field is required if the other field is missing\n if (isEmptyValue(value) && fieldValue === undefined) {\n this.context.translatableParams.field = this.context.options.field;\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required without all rule - field is required if all specified fields are missing\n * Supports both global and sibling scope\n */\nexport const requiredWithoutAllRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredWithoutAll\",\n description: \"The field is required if all specified fields are missing\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { fields, scope = \"global\" } = this.context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n\n // Check if all fields are missing\n const allMissing = fields.every((field) => get(source, field) === undefined);\n\n // Field is required if all other fields are missing\n if (isEmptyValue(value) && allMissing) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Required without any rule - field is required if any of the specified fields is missing\n * Supports both global and sibling scope\n */\nexport const requiredWithoutAnyRule: SchemaRule<{\n fields: string[];\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"requiredWithoutAny\",\n description: \"The field is required if any of the specified fields is missing\",\n sortOrder: -2,\n requiresValue: false,\n defaultErrorMessage: \"The :input is required\",\n async validate(value: any, context) {\n const { fields, scope = \"global\" } = this.context.options;\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n\n // Check if any field is missing\n const anyMissing = fields.some((field) => get(source, field) === undefined);\n\n // Field is required if any other field is missing\n if (isEmptyValue(value) && anyMissing) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;AASA,MAAa,sBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,aAAa,KAAK,KAAK,eAAe,QAAW;GACnD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,yBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,OAAO,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG3E,IAAI,aAAa,KAAK,KAAK,YACzB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;;AAMA,MAAa,yBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,MAAM,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG1E,IAAI,aAAa,KAAK,KAAK,YACzB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/core/equal.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/core/equal.d.ts
3
4
  /**
4
5
  * Equal rule - value must be equal to a specific value
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"equal.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/core/equal.ts"],"mappings":";;;;;cAMa,SAAA,EAAW,UAAU;EAAG,KAAK;AAAA"}
1
+ {"version":3,"file":"equal.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/equal.ts"],"mappings":";;;;;AAMA;cAAa,SAAA,EAAW,UAAU;EAAG,KAAK;AAAA"}
@@ -1,7 +1,7 @@
1
1
  import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import "../../helpers/index.mjs";
3
3
 
4
- //#region ../seal/src/rules/core/equal.ts
4
+ //#region ../../packages/seal/src/rules/core/equal.ts
5
5
  /**
6
6
  * Equal rule - value must be equal to a specific value
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"equal.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/core/equal.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Equal rule - value must be equal to a specific value\n */\nexport const equalRule: SchemaRule<{ value: any }> = {\n name: \"equal\",\n defaultErrorMessage: \"The :input must be equal to :value\",\n async validate(value: any, context) {\n if (value !== this.context.options.value) {\n this.context.translatableParams.value = this.context.options.value;\n return invalidRule(this, context);\n }\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,YAAwC;CACnD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,UAAU,KAAK,QAAQ,QAAQ,OAAO;GACxC,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EACA,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"equal.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/equal.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Equal rule - value must be equal to a specific value\n */\nexport const equalRule: SchemaRule<{ value: any }> = {\n name: \"equal\",\n defaultErrorMessage: \"The :input must be equal to :value\",\n async validate(value: any, context) {\n if (value !== this.context.options.value) {\n this.context.translatableParams.value = this.context.options.value;\n return invalidRule(this, context);\n }\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,YAAwC;CACnD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,UAAU,KAAK,QAAQ,QAAQ,OAAO;GACxC,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EACA,OAAO;CACT;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/core/forbidden.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/core/forbidden.d.ts
3
4
  /**
4
5
  * Forbidden rule - value must not be present
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"forbidden.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/core/forbidden.ts"],"mappings":";;;;;cAOa,aAAA,EAAe,UAS3B"}
1
+ {"version":3,"file":"forbidden.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/forbidden.ts"],"mappings":";;;;;AAOA;cAAa,aAAA,EAAe,UAS3B"}
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
3
3
  import "../../helpers/index.mjs";
4
4
 
5
- //#region ../seal/src/rules/core/forbidden.ts
5
+ //#region ../../packages/seal/src/rules/core/forbidden.ts
6
6
  /**
7
7
  * Forbidden rule - value must not be present
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"forbidden.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/core/forbidden.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Forbidden rule - value must not be present\n */\nexport const forbiddenRule: SchemaRule = {\n name: \"forbidden\",\n defaultErrorMessage: \"The :input is forbidden\",\n async validate(value: any, context) {\n if (!isEmptyValue(value)) {\n return invalidRule(this, context);\n }\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;AAOA,MAAa,gBAA4B;CACvC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,CAAC,aAAa,KAAK,GACrB,OAAO,YAAY,MAAM,OAAO;EAElC,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"forbidden.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/forbidden.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Forbidden rule - value must not be present\n */\nexport const forbiddenRule: SchemaRule = {\n name: \"forbidden\",\n defaultErrorMessage: \"The :input is forbidden\",\n async validate(value: any, context) {\n if (!isEmptyValue(value)) {\n return invalidRule(this, context);\n }\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;AAOA,MAAa,gBAA4B;CACvC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,CAAC,aAAa,KAAK,GACrB,OAAO,YAAY,MAAM,OAAO;EAElC,OAAO;CACT;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/core/required.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/core/required.d.ts
3
4
  /**
4
5
  * Required rule - value must be present and not empty
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"required.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/core/required.ts"],"mappings":";;;;;cAOa,YAAA,EAAc,UAW1B;;;;AAAA;cAMY,WAAA,EAAa,UAYzB"}
1
+ {"version":3,"file":"required.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/required.ts"],"mappings":";;;;;AAOA;cAAa,YAAA,EAAc,UAW1B;;;AAAA;AAMD;cAAa,WAAA,EAAa,UAYzB"}
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
3
3
  import "../../helpers/index.mjs";
4
4
 
5
- //#region ../seal/src/rules/core/required.ts
5
+ //#region ../../packages/seal/src/rules/core/required.ts
6
6
  /**
7
7
  * Required rule - value must be present and not empty
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"required.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/core/required.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Required rule - value must be present and not empty\n */\nexport const requiredRule: SchemaRule = {\n name: \"required\",\n defaultErrorMessage: \"The :input is required\",\n requiresValue: false,\n sortOrder: -2,\n async validate(value: any, context) {\n if (isEmptyValue(value)) {\n return invalidRule(this, context);\n }\n return VALID_RULE;\n },\n};\n\n/**\n * Present rule - key must exist in the data, but value can be anything\n * (empty string, null are all valid as long as the key exists)\n */\nexport const presentRule: SchemaRule = {\n name: \"present\",\n defaultErrorMessage: \"The :input field is required\",\n requiresValue: false,\n sortOrder: -2,\n async validate(value: any, context) {\n if (value === undefined) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;AAOA,MAAa,eAA2B;CACtC,MAAM;CACN,qBAAqB;CACrB,eAAe;CACf,WAAW;CACX,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,aAAa,KAAK,GACpB,OAAO,YAAY,MAAM,OAAO;EAElC,OAAO;CACT;AACF;;;;;AAMA,MAAa,cAA0B;CACrC,MAAM;CACN,qBAAqB;CACrB,eAAe;CACf,WAAW;CACX,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,UAAU,QACZ,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"required.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/required.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Required rule - value must be present and not empty\n */\nexport const requiredRule: SchemaRule = {\n name: \"required\",\n defaultErrorMessage: \"The :input is required\",\n requiresValue: false,\n sortOrder: -2,\n async validate(value: any, context) {\n if (isEmptyValue(value)) {\n return invalidRule(this, context);\n }\n return VALID_RULE;\n },\n};\n\n/**\n * Present rule - key must exist in the data, but value can be anything\n * (empty string, null are all valid as long as the key exists)\n */\nexport const presentRule: SchemaRule = {\n name: \"present\",\n defaultErrorMessage: \"The :input field is required\",\n requiresValue: false,\n sortOrder: -2,\n async validate(value: any, context) {\n if (value === undefined) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;AAOA,MAAa,eAA2B;CACtC,MAAM;CACN,qBAAqB;CACrB,eAAe;CACf,WAAW;CACX,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,aAAa,KAAK,GACpB,OAAO,YAAY,MAAM,OAAO;EAElC,OAAO;CACT;AACF;;;;;AAMA,MAAa,cAA0B;CACrC,MAAM;CACN,qBAAqB;CACrB,eAAe;CACf,WAAW;CACX,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,UAAU,QACZ,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
@@ -1,7 +1,7 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
2
  import { BaseValidator } from "../../validators/base-validator.mjs";
3
3
 
4
- //#region ../seal/src/rules/core/union.d.ts
4
+ //#region ../../packages/seal/src/rules/core/union.d.ts
5
5
  /**
6
6
  * Union rule - value must match at least one of the provided validators
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"union.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/core/union.ts"],"mappings":";;;;;;;cAOa,SAAA,EAAW,UAAU;EAAG,UAAA,EAAY,aAAA;AAAA"}
1
+ {"version":3,"file":"union.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/union.ts"],"mappings":";;;;;;AAOA;cAAa,SAAA,EAAW,UAAU;EAAG,UAAA,EAAY,aAAA;AAAA"}
@@ -1,14 +1,16 @@
1
1
  import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import "../../helpers/index.mjs";
3
3
 
4
- //#region ../seal/src/rules/core/union.ts
4
+ //#region ../../packages/seal/src/rules/core/union.ts
5
5
  /**
6
6
  * Union rule - value must match at least one of the provided validators
7
7
  */
8
8
  const unionRule = {
9
9
  name: "union",
10
+ requiresValue: false,
10
11
  defaultErrorMessage: "Value must match one of the allowed types",
11
12
  async validate(value, context) {
13
+ if (value === void 0) return VALID_RULE;
12
14
  const validators = this.context.options.validators;
13
15
  const firstErrorOnly = context.configurations?.firstErrorOnly ?? true;
14
16
  const allErrors = [];
@@ -1 +1 @@
1
- {"version":3,"file":"union.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/core/union.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\nimport type { BaseValidator } from \"../../validators/base-validator\";\n\n/**\n * Union rule - value must match at least one of the provided validators\n */\nexport const unionRule: SchemaRule<{ validators: BaseValidator[] }> = {\n name: \"union\",\n defaultErrorMessage: \"Value must match one of the allowed types\",\n async validate(value: any, context) {\n const validators = this.context.options.validators;\n const firstErrorOnly = context.configurations?.firstErrorOnly ?? true;\n const allErrors: string[] = [];\n\n // Try each validator\n for (const validator of validators) {\n // Skip if type doesn't match (optimization)\n if (!validator.matchesType(value)) {\n continue;\n }\n\n // Type matches - validate\n const result = await validator.validate(value, context);\n\n if (result.isValid) {\n // Success! Validator matched and validated\n return VALID_RULE;\n }\n\n // Failed - collect error message\n const errorMsg = result.errors?.[0]?.error || \"Validation failed\";\n allErrors.push(errorMsg);\n\n // If firstErrorOnly, stop after first failed validator\n if (firstErrorOnly) {\n break;\n }\n }\n\n // All failed or no validator matched the type\n if (allErrors.length > 0) {\n // At least one validator matched type but failed validation\n this.context.errorMessage = firstErrorOnly\n ? allErrors[0]\n : allErrors.join(\"; \");\n }\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;AAOA,MAAa,YAAyD;CACpE,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,KAAK,QAAQ,QAAQ;EACxC,MAAM,iBAAiB,QAAQ,gBAAgB,kBAAkB;EACjE,MAAM,YAAsB,CAAC;EAG7B,KAAK,MAAM,aAAa,YAAY;GAElC,IAAI,CAAC,UAAU,YAAY,KAAK,GAC9B;GAIF,MAAM,SAAS,MAAM,UAAU,SAAS,OAAO,OAAO;GAEtD,IAAI,OAAO,SAET,OAAO;GAIT,MAAM,WAAW,OAAO,SAAS,EAAE,EAAE,SAAS;GAC9C,UAAU,KAAK,QAAQ;GAGvB,IAAI,gBACF;EAEJ;EAGA,IAAI,UAAU,SAAS,GAErB,KAAK,QAAQ,eAAe,iBACxB,UAAU,KACV,UAAU,KAAK,IAAI;EAGzB,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"union.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/union.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\nimport type { BaseValidator } from \"../../validators/base-validator\";\n\n/**\n * Union rule - value must match at least one of the provided validators\n */\nexport const unionRule: SchemaRule<{ validators: BaseValidator[] }> = {\n name: \"union\",\n // Runs on \"empty\" values too: `v.union([v.literal(\"\"), v.int()]).present()`\n // must still ask its members about `\"\"` instead of accepting it unchecked.\n requiresValue: false,\n defaultErrorMessage: \"Value must match one of the allowed types\",\n async validate(value: any, context) {\n // Absence is the required/present rule's question, as for `literalRule`;\n // answering it here would defeat `.optional()`.\n if (value === undefined) {\n return VALID_RULE;\n }\n\n const validators = this.context.options.validators;\n const firstErrorOnly = context.configurations?.firstErrorOnly ?? true;\n const allErrors: string[] = [];\n\n // Try each validator\n for (const validator of validators) {\n // Skip if type doesn't match (optimization)\n if (!validator.matchesType(value)) {\n continue;\n }\n\n // Type matches - validate\n const result = await validator.validate(value, context);\n\n if (result.isValid) {\n // Success! Validator matched and validated\n return VALID_RULE;\n }\n\n // Failed - collect error message\n const errorMsg = result.errors?.[0]?.error || \"Validation failed\";\n allErrors.push(errorMsg);\n\n // If firstErrorOnly, stop after first failed validator\n if (firstErrorOnly) {\n break;\n }\n }\n\n // All failed or no validator matched the type\n if (allErrors.length > 0) {\n // At least one validator matched type but failed validation\n this.context.errorMessage = firstErrorOnly\n ? allErrors[0]\n : allErrors.join(\"; \");\n }\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;AAOA,MAAa,YAAyD;CACpE,MAAM;CAGN,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAGlC,IAAI,UAAU,QACZ,OAAO;EAGT,MAAM,aAAa,KAAK,QAAQ,QAAQ;EACxC,MAAM,iBAAiB,QAAQ,gBAAgB,kBAAkB;EACjE,MAAM,YAAsB,CAAC;EAG7B,KAAK,MAAM,aAAa,YAAY;GAElC,IAAI,CAAC,UAAU,YAAY,KAAK,GAC9B;GAIF,MAAM,SAAS,MAAM,UAAU,SAAS,OAAO,OAAO;GAEtD,IAAI,OAAO,SAET,OAAO;GAIT,MAAM,WAAW,OAAO,SAAS,EAAE,EAAE,SAAS;GAC9C,UAAU,KAAK,QAAQ;GAGvB,IAAI,gBACF;EAEJ;EAGA,IAAI,UAAU,SAAS,GAErB,KAAK,QAAQ,eAAe,iBACxB,UAAU,KACV,UAAU,KAAK,IAAI;EAGzB,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -1,6 +1,7 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
2
  import { WhenRuleOptions } from "../../types/conditional-types.mjs";
3
- //#region ../seal/src/rules/core/when.d.ts
3
+
4
+ //#region ../../packages/seal/src/rules/core/when.d.ts
4
5
  /**
5
6
  * When rule - conditional validation based on another field value
6
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"when.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/core/when.ts"],"mappings":";;;;;;cAOa,QAAA,EAAU,UAAU,CAAC,eAAA"}
1
+ {"version":3,"file":"when.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/when.ts"],"mappings":";;;;;;;cAOa,QAAA,EAAU,UAAU,CAAC,eAAA"}
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import "../../helpers/index.mjs";
3
3
  import { get } from "@mongez/reinforcements";
4
4
 
5
- //#region ../seal/src/rules/core/when.ts
5
+ //#region ../../packages/seal/src/rules/core/when.ts
6
6
  /**
7
7
  * When rule - conditional validation based on another field value
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"when.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/core/when.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule, WhenRuleOptions } from \"../../types\";\n\n/**\n * When rule - conditional validation based on another field value\n */\nexport const whenRule: SchemaRule<WhenRuleOptions> = {\n name: \"when\",\n description: \"Apply conditional validation based on another field value\",\n async validate(value: any, context) {\n const fieldToCheck = this.context.options.field;\n const conditions = this.context.options.is;\n const otherwise = this.context.options.otherwise;\n const scope = this.context.options.scope || \"global\";\n\n const fieldValue =\n scope === \"global\"\n ? get(context.allValues, fieldToCheck)\n : get(context.parent, fieldToCheck);\n\n // Convert field value to string for key lookup\n // This handles boolean, number, and string field values\n const fieldValueKey = String(fieldValue);\n\n if (conditions[fieldValueKey]) {\n const result = await conditions[fieldValueKey].validate(value, context);\n if (result.isValid) {\n return VALID_RULE;\n }\n\n // Safe error access\n this.context.errorMessage =\n result.errors?.[0]?.error || \"Validation failed\";\n return invalidRule(this, context);\n }\n\n if (otherwise) {\n const result = await otherwise.validate(value, context);\n\n if (result.isValid) {\n return VALID_RULE;\n }\n\n // Safe error access\n this.context.errorMessage =\n result.errors?.[0]?.error || \"Validation failed\";\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;AAOA,MAAa,WAAwC;CACnD,MAAM;CACN,aAAa;CACb,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,eAAe,KAAK,QAAQ,QAAQ;EAC1C,MAAM,aAAa,KAAK,QAAQ,QAAQ;EACxC,MAAM,YAAY,KAAK,QAAQ,QAAQ;EAGvC,MAAM,cAFQ,KAAK,QAAQ,QAAQ,SAAS,cAGhC,WACN,IAAI,QAAQ,WAAW,YAAY,IACnC,IAAI,QAAQ,QAAQ,YAAY;EAItC,MAAM,gBAAgB,OAAO,UAAU;EAEvC,IAAI,WAAW,gBAAgB;GAC7B,MAAM,SAAS,MAAM,WAAW,cAAc,CAAC,SAAS,OAAO,OAAO;GACtE,IAAI,OAAO,SACT,OAAO;GAIT,KAAK,QAAQ,eACX,OAAO,SAAS,EAAE,EAAE,SAAS;GAC/B,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,IAAI,WAAW;GACb,MAAM,SAAS,MAAM,UAAU,SAAS,OAAO,OAAO;GAEtD,IAAI,OAAO,SACT,OAAO;GAIT,KAAK,QAAQ,eACX,OAAO,SAAS,EAAE,EAAE,SAAS;GAC/B,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"when.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/core/when.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule, WhenRuleOptions } from \"../../types\";\n\n/**\n * When rule - conditional validation based on another field value\n */\nexport const whenRule: SchemaRule<WhenRuleOptions> = {\n name: \"when\",\n description: \"Apply conditional validation based on another field value\",\n async validate(value: any, context) {\n const fieldToCheck = this.context.options.field;\n const conditions = this.context.options.is;\n const otherwise = this.context.options.otherwise;\n const scope = this.context.options.scope || \"global\";\n\n const fieldValue =\n scope === \"global\"\n ? get(context.allValues, fieldToCheck)\n : get(context.parent, fieldToCheck);\n\n // Convert field value to string for key lookup\n // This handles boolean, number, and string field values\n const fieldValueKey = String(fieldValue);\n\n if (conditions[fieldValueKey]) {\n const result = await conditions[fieldValueKey].validate(value, context);\n if (result.isValid) {\n return VALID_RULE;\n }\n\n // Safe error access\n this.context.errorMessage =\n result.errors?.[0]?.error || \"Validation failed\";\n return invalidRule(this, context);\n }\n\n if (otherwise) {\n const result = await otherwise.validate(value, context);\n\n if (result.isValid) {\n return VALID_RULE;\n }\n\n // Safe error access\n this.context.errorMessage =\n result.errors?.[0]?.error || \"Validation failed\";\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;AAOA,MAAa,WAAwC;CACnD,MAAM;CACN,aAAa;CACb,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,eAAe,KAAK,QAAQ,QAAQ;EAC1C,MAAM,aAAa,KAAK,QAAQ,QAAQ;EACxC,MAAM,YAAY,KAAK,QAAQ,QAAQ;EAGvC,MAAM,cAFQ,KAAK,QAAQ,QAAQ,SAAS,cAGhC,WACN,IAAI,QAAQ,WAAW,YAAY,IACnC,IAAI,QAAQ,QAAQ,YAAY;EAItC,MAAM,gBAAgB,OAAO,UAAU;EAEvC,IAAI,WAAW,gBAAgB;GAC7B,MAAM,SAAS,MAAM,WAAW,cAAc,CAAC,SAAS,OAAO,OAAO;GACtE,IAAI,OAAO,SACT,OAAO;GAIT,KAAK,QAAQ,eACX,OAAO,SAAS,EAAE,EAAE,SAAS;GAC/B,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,IAAI,WAAW;GACb,MAAM,SAAS,MAAM,UAAU,SAAS,OAAO,OAAO;GAEtD,IAAI,OAAO,SACT,OAAO;GAIT,KAAK,QAAQ,eACX,OAAO,SAAS,EAAE,EAAE,SAAS;GAC/B,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/date/date-comparison-rules.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/date/date-comparison-rules.d.ts
3
4
  /**
4
5
  * Between dates rule - date must be between start and end dates
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"date-comparison-rules.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/date/date-comparison-rules.ts"],"mappings":";;;;;cAMa,gBAAA,EAAkB,UAAA;EAC7B,SAAA,EAAW,IAAA;EACX,OAAA,EAAS,IAAA;AAAA;;;;cAqBE,SAAA,EAAW,UAcvB;;;;cAKY,QAAA,EAAU,UAYtB;;;AApDc;cAyDF,UAAA,EAAY,UAYxB;;;;cAKY,cAAA,EAAgB,UAc5B"}
1
+ {"version":3,"file":"date-comparison-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/date/date-comparison-rules.ts"],"mappings":";;;;;AAMA;cAAa,gBAAA,EAAkB,UAAA;EAC7B,SAAA,EAAW,IAAA;EACX,OAAA,EAAS,IAAA;AAAA;;;;cAqBE,SAAA,EAAW,UAcvB;;;;cAKY,QAAA,EAAU,UAYtB;;AApDc;AAqBf;cAoCa,UAAA,EAAY,UAYxB;;;AAlCA;cAuCY,cAAA,EAAgB,UAc5B"}
@@ -1,7 +1,7 @@
1
1
  import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import "../../helpers/index.mjs";
3
3
 
4
- //#region ../seal/src/rules/date/date-comparison-rules.ts
4
+ //#region ../../packages/seal/src/rules/date/date-comparison-rules.ts
5
5
  /**
6
6
  * Between dates rule - date must be between start and end dates
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"date-comparison-rules.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/date/date-comparison-rules.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Between dates rule - date must be between start and end dates\n */\nexport const betweenDatesRule: SchemaRule<{\n startDate: Date;\n endDate: Date;\n}> = {\n name: \"betweenDates\",\n defaultErrorMessage: \"The :input must be between :startDate and :endDate\",\n async validate(value: Date, context) {\n const { startDate, endDate } = this.context.options;\n const inputDate = new Date(value);\n\n if (inputDate >= startDate && inputDate <= endDate) {\n this.context.translationParams.startDate = startDate.toISOString();\n this.context.translationParams.endDate = endDate.toISOString();\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Today rule - date must be exactly today\n */\nexport const todayRule: SchemaRule = {\n name: \"today\",\n defaultErrorMessage: \"The :input must be 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.getTime() === today.getTime()) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Past rule - date must be in the past\n */\nexport const pastRule: SchemaRule = {\n name: \"past\",\n defaultErrorMessage: \"The :input must be in the past\",\n async validate(value: Date, context) {\n const now = new Date();\n const inputDate = new Date(value);\n\n if (inputDate < now) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Future rule - date must be in the future\n */\nexport const futureRule: SchemaRule = {\n name: \"future\",\n defaultErrorMessage: \"The :input must be in the future\",\n async validate(value: Date, context) {\n const now = new Date();\n\n if (value > now) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * After today rule - date must be after today (not including today)\n */\nexport const afterTodayRule: SchemaRule = {\n name: \"afterToday\",\n defaultErrorMessage: \"The :input must be after 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"],"mappings":";;;;;;;AAMA,MAAa,mBAGR;CACH,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,EAAE,WAAW,YAAY,KAAK,QAAQ;EAC5C,MAAM,YAAY,IAAI,KAAK,KAAK;EAEhC,IAAI,aAAa,aAAa,aAAa,SAAS;GAClD,KAAK,QAAQ,kBAAkB,YAAY,UAAU,YAAY;GACjE,KAAK,QAAQ,kBAAkB,UAAU,QAAQ,YAAY;GAC7D,OAAO;EACT;EAEA,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,YAAwB;CACnC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,wBAAQ,IAAI,KAAK;EACvB,MAAM,SAAS,GAAG,GAAG,GAAG,CAAC;EACzB,MAAM,YAAY,IAAI,KAAK,KAAK;EAChC,UAAU,SAAS,GAAG,GAAG,GAAG,CAAC;EAE7B,IAAI,UAAU,QAAQ,MAAM,MAAM,QAAQ,GACxC,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,WAAuB;CAClC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,sBAAM,IAAI,KAAK;EAGrB,IAAI,IAFkB,KAAK,KAEf,IAAI,KACd,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,aAAyB;CACpC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAGnC,IAAI,wBAAQ,IAFI,KAEF,GACZ,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,iBAA6B;CACxC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,wBAAQ,IAAI,KAAK;EACvB,MAAM,SAAS,GAAG,GAAG,GAAG,CAAC;EACzB,MAAM,YAAY,IAAI,KAAK,KAAK;EAChC,UAAU,SAAS,GAAG,GAAG,GAAG,CAAC;EAE7B,IAAI,YAAY,OACd,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"date-comparison-rules.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/date/date-comparison-rules.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Between dates rule - date must be between start and end dates\n */\nexport const betweenDatesRule: SchemaRule<{\n startDate: Date;\n endDate: Date;\n}> = {\n name: \"betweenDates\",\n defaultErrorMessage: \"The :input must be between :startDate and :endDate\",\n async validate(value: Date, context) {\n const { startDate, endDate } = this.context.options;\n const inputDate = new Date(value);\n\n if (inputDate >= startDate && inputDate <= endDate) {\n this.context.translationParams.startDate = startDate.toISOString();\n this.context.translationParams.endDate = endDate.toISOString();\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Today rule - date must be exactly today\n */\nexport const todayRule: SchemaRule = {\n name: \"today\",\n defaultErrorMessage: \"The :input must be 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.getTime() === today.getTime()) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Past rule - date must be in the past\n */\nexport const pastRule: SchemaRule = {\n name: \"past\",\n defaultErrorMessage: \"The :input must be in the past\",\n async validate(value: Date, context) {\n const now = new Date();\n const inputDate = new Date(value);\n\n if (inputDate < now) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Future rule - date must be in the future\n */\nexport const futureRule: SchemaRule = {\n name: \"future\",\n defaultErrorMessage: \"The :input must be in the future\",\n async validate(value: Date, context) {\n const now = new Date();\n\n if (value > now) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * After today rule - date must be after today (not including today)\n */\nexport const afterTodayRule: SchemaRule = {\n name: \"afterToday\",\n defaultErrorMessage: \"The :input must be after 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"],"mappings":";;;;;;;AAMA,MAAa,mBAGR;CACH,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,EAAE,WAAW,YAAY,KAAK,QAAQ;EAC5C,MAAM,YAAY,IAAI,KAAK,KAAK;EAEhC,IAAI,aAAa,aAAa,aAAa,SAAS;GAClD,KAAK,QAAQ,kBAAkB,YAAY,UAAU,YAAY;GACjE,KAAK,QAAQ,kBAAkB,UAAU,QAAQ,YAAY;GAC7D,OAAO;EACT;EAEA,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,YAAwB;CACnC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,wBAAQ,IAAI,KAAK;EACvB,MAAM,SAAS,GAAG,GAAG,GAAG,CAAC;EACzB,MAAM,YAAY,IAAI,KAAK,KAAK;EAChC,UAAU,SAAS,GAAG,GAAG,GAAG,CAAC;EAE7B,IAAI,UAAU,QAAQ,MAAM,MAAM,QAAQ,GACxC,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,WAAuB;CAClC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,sBAAM,IAAI,KAAK;EAGrB,IAAI,IAFkB,KAAK,KAEf,IAAI,KACd,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,aAAyB;CACpC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAGnC,IAAI,wBAAQ,IAFI,KAEF,GACZ,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,iBAA6B;CACxC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,wBAAQ,IAAI,KAAK;EACvB,MAAM,SAAS,GAAG,GAAG,GAAG,CAAC;EACzB,MAAM,YAAY,IAAI,KAAK,KAAK;EAChC,UAAU,SAAS,GAAG,GAAG,GAAG,CAAC;EAE7B,IAAI,YAAY,OACd,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -1,6 +1,7 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
2
  import { WeekDay } from "../../types/date-types.mjs";
3
- //#region ../seal/src/rules/date/date-day-rules.d.ts
3
+
4
+ //#region ../../packages/seal/src/rules/date/date-day-rules.d.ts
4
5
  /**
5
6
  * Weekend rule - date must be Saturday or Sunday
6
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"date-day-rules.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/date/date-day-rules.ts"],"mappings":";;;;;;cAQa,WAAA,EAAa,UAazB;;;;cAKY,WAAA,EAAa,UAczB;AAdD;;;AAAA,cAmBa,YAAA,EAAc,UAAU;EAAG,IAAA,EAAM,OAAA;AAAA;;;;cAyBjC,eAAA,EAAiB,UAc7B"}
1
+ {"version":3,"file":"date-day-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/date/date-day-rules.ts"],"mappings":";;;;;;AAQA;cAAa,WAAA,EAAa,UAazB;;;AAAA;cAKY,WAAA,EAAa,UAczB;;;;cAKY,YAAA,EAAc,UAAU;EAAG,IAAA,EAAM,OAAA;AAAA;;;;cAyBjC,eAAA,EAAiB,UAc7B"}
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import "../../helpers/index.mjs";
3
3
  import { WEEK_DAYS } from "../../types/date-types.mjs";
4
4
 
5
- //#region ../seal/src/rules/date/date-day-rules.ts
5
+ //#region ../../packages/seal/src/rules/date/date-day-rules.ts
6
6
  /**
7
7
  * Weekend rule - date must be Saturday or Sunday
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"date-day-rules.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/date/date-day-rules.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\nimport type { WeekDay } from \"../../types/date-types\";\nimport { WEEK_DAYS } from \"../../types/date-types\";\n\n/**\n * Weekend rule - date must be Saturday or Sunday\n */\nexport const weekendRule: SchemaRule = {\n name: \"weekend\",\n defaultErrorMessage: \"The :input must be a weekend (Saturday or Sunday)\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const dayOfWeek = inputDate.getDay();\n\n // 0 = Sunday, 6 = Saturday\n if (dayOfWeek === 0 || dayOfWeek === 6) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Weekday rule - date must be Monday through Friday\n */\nexport const weekdayRule: SchemaRule = {\n name: \"weekday\",\n defaultErrorMessage: \"The :input must be a weekday (Monday-Friday)\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const dayOfWeek = inputDate.getDay();\n\n // 1-5 = Monday-Friday\n if (dayOfWeek >= 1 && dayOfWeek <= 5) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Weekdays rule - date must be one of specified weekdays\n */\nexport const weekdaysRule: SchemaRule<{ days: WeekDay[] }> = {\n name: \"weekdays\",\n defaultErrorMessage: \"The :input must be one of: :days\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const dayOfWeek = inputDate.getDay();\n const { days } = this.context.options;\n\n const allowedDays = days.map((day) => WEEK_DAYS[day]);\n\n if (allowedDays.includes(dayOfWeek)) {\n return VALID_RULE;\n }\n\n days.forEach((day) => {\n this.context.translatableParams[day] = day;\n });\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Business day rule - date must be Monday-Friday (no weekends)\n */\nexport const businessDayRule: SchemaRule = {\n name: \"businessDay\",\n defaultErrorMessage: \"The :input must be a business day\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const dayOfWeek = inputDate.getDay();\n\n // 1-5 = Monday-Friday\n if (dayOfWeek >= 1 && dayOfWeek <= 5) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;AAQA,MAAa,cAA0B;CACrC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAEnC,MAAM,YAAY,IADI,KAAK,KACD,CAAC,CAAC,OAAO;EAGnC,IAAI,cAAc,KAAK,cAAc,GACnC,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,cAA0B;CACrC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAEnC,MAAM,YAAY,IADI,KAAK,KACD,CAAC,CAAC,OAAO;EAGnC,IAAI,aAAa,KAAK,aAAa,GACjC,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,eAAgD;CAC3D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAEnC,MAAM,YAAY,IADI,KAAK,KACD,CAAC,CAAC,OAAO;EACnC,MAAM,EAAE,SAAS,KAAK,QAAQ;EAI9B,IAFoB,KAAK,KAAK,QAAQ,UAAU,IAElC,CAAC,CAAC,SAAS,SAAS,GAChC,OAAO;EAGT,KAAK,SAAS,QAAQ;GACpB,KAAK,QAAQ,mBAAmB,OAAO;EACzC,CAAC;EAED,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,kBAA8B;CACzC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAEnC,MAAM,YAAY,IADI,KAAK,KACD,CAAC,CAAC,OAAO;EAGnC,IAAI,aAAa,KAAK,aAAa,GACjC,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"date-day-rules.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/date/date-day-rules.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\nimport type { WeekDay } from \"../../types/date-types\";\nimport { WEEK_DAYS } from \"../../types/date-types\";\n\n/**\n * Weekend rule - date must be Saturday or Sunday\n */\nexport const weekendRule: SchemaRule = {\n name: \"weekend\",\n defaultErrorMessage: \"The :input must be a weekend (Saturday or Sunday)\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const dayOfWeek = inputDate.getDay();\n\n // 0 = Sunday, 6 = Saturday\n if (dayOfWeek === 0 || dayOfWeek === 6) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Weekday rule - date must be Monday through Friday\n */\nexport const weekdayRule: SchemaRule = {\n name: \"weekday\",\n defaultErrorMessage: \"The :input must be a weekday (Monday-Friday)\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const dayOfWeek = inputDate.getDay();\n\n // 1-5 = Monday-Friday\n if (dayOfWeek >= 1 && dayOfWeek <= 5) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Weekdays rule - date must be one of specified weekdays\n */\nexport const weekdaysRule: SchemaRule<{ days: WeekDay[] }> = {\n name: \"weekdays\",\n defaultErrorMessage: \"The :input must be one of: :days\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const dayOfWeek = inputDate.getDay();\n const { days } = this.context.options;\n\n const allowedDays = days.map((day) => WEEK_DAYS[day]);\n\n if (allowedDays.includes(dayOfWeek)) {\n return VALID_RULE;\n }\n\n days.forEach((day) => {\n this.context.translatableParams[day] = day;\n });\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Business day rule - date must be Monday-Friday (no weekends)\n */\nexport const businessDayRule: SchemaRule = {\n name: \"businessDay\",\n defaultErrorMessage: \"The :input must be a business day\",\n async validate(value: Date, context) {\n const inputDate = new Date(value);\n const dayOfWeek = inputDate.getDay();\n\n // 1-5 = Monday-Friday\n if (dayOfWeek >= 1 && dayOfWeek <= 5) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;AAQA,MAAa,cAA0B;CACrC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAEnC,MAAM,YAAY,IADI,KAAK,KACD,CAAC,CAAC,OAAO;EAGnC,IAAI,cAAc,KAAK,cAAc,GACnC,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,cAA0B;CACrC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAEnC,MAAM,YAAY,IADI,KAAK,KACD,CAAC,CAAC,OAAO;EAGnC,IAAI,aAAa,KAAK,aAAa,GACjC,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,eAAgD;CAC3D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAEnC,MAAM,YAAY,IADI,KAAK,KACD,CAAC,CAAC,OAAO;EACnC,MAAM,EAAE,SAAS,KAAK,QAAQ;EAI9B,IAFoB,KAAK,KAAK,QAAQ,UAAU,IAElC,CAAC,CAAC,SAAS,SAAS,GAChC,OAAO;EAGT,KAAK,SAAS,QAAQ;GACpB,KAAK,QAAQ,mBAAmB,OAAO;EACzC,CAAC;EAED,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,kBAA8B;CACzC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAEnC,MAAM,YAAY,IADI,KAAK,KACD,CAAC,CAAC,OAAO;EAGnC,IAAI,aAAa,KAAK,aAAa,GACjC,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/date/date-field-comparison-rules.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/date/date-field-comparison-rules.d.ts
3
4
  /**
4
5
  * Before field rule - date must be < given date or field
5
6
  * Smart detection: date value or field name
@@ -1 +1 @@
1
- {"version":3,"file":"date-field-comparison-rules.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/date/date-field-comparison-rules.ts"],"mappings":";;;;;AAUA;;cAAa,eAAA,EAAiB,UAAU;EACtC,WAAA,EAAa,IAAA;EACb,KAAA;AAAA;;;;AAAK;AAsCP;cAAa,cAAA,EAAgB,UAAU;EACrC,WAAA,EAAa,IAAA;EACb,KAAA;AAAA;;;;;cAwCW,mBAAA,EAAqB,UAAU;EAC1C,KAAA;EACA,KAAA;AAAA"}
1
+ {"version":3,"file":"date-field-comparison-rules.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/date/date-field-comparison-rules.ts"],"mappings":";;;;;AAUA;;;cAAa,eAAA,EAAiB,UAAU;EACtC,WAAA,EAAa,IAAA;EACb,KAAA;AAAA;;;AAAK;AAsCP;;cAAa,cAAA,EAAgB,UAAU;EACrC,WAAA,EAAa,IAAA;EACb,KAAA;AAAA;;;;AAAK;cAwCM,mBAAA,EAAqB,UAAU;EAC1C,KAAA;EACA,KAAA;AAAA"}
@@ -3,7 +3,7 @@ import { isDateValue } from "../../helpers/date-helpers.mjs";
3
3
  import "../../helpers/index.mjs";
4
4
  import { get } from "@mongez/reinforcements";
5
5
 
6
- //#region ../seal/src/rules/date/date-field-comparison-rules.ts
6
+ //#region ../../packages/seal/src/rules/date/date-field-comparison-rules.ts
7
7
  /**
8
8
  * Before field rule - date must be < given date or field
9
9
  * Smart detection: date value or field name