@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":"number-rules.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/number/number-rules.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Min rule - value must be equal or greater than minimum\n * Supports field names with sibling scope\n */\nexport const minRule: SchemaRule<{\n min: number | string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"min\",\n defaultErrorMessage: \"The :input must be at least :min\",\n async validate(value: any, context) {\n const { min, scope = \"global\" } = this.context.options;\n let compareMin: number;\n\n if (typeof min === \"number\") {\n compareMin = min;\n this.context.translationParams.min = min;\n } else {\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, min);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.min = min;\n\n compareMin = Number(fieldValue);\n\n if (isNaN(compareMin)) {\n return VALID_RULE;\n }\n }\n\n if (value >= compareMin) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Max rule - value must be equal or less than maximum\n * Supports field names with sibling scope\n */\nexport const maxRule: SchemaRule<{\n max: number | string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"max\",\n defaultErrorMessage: \"The :input must equal to or less than :max\",\n async validate(value: any, context) {\n const { max, scope = \"global\" } = this.context.options;\n let compareMax: number;\n\n if (typeof max === \"number\") {\n compareMax = max;\n this.context.translationParams.max = max;\n } else {\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, max);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.max = max;\n\n compareMax = Number(fieldValue);\n\n if (isNaN(compareMax)) {\n return VALID_RULE;\n }\n }\n\n if (value <= compareMax) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Greater than rule - value must be strictly greater than minimum\n * Supports field names with sibling scope\n */\nexport const greaterThanRule: SchemaRule<{\n value: number | string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"greaterThan\",\n defaultErrorMessage: \"The :input must be greater than :value\",\n async validate(value: any, context) {\n const { value: compareValue, scope = \"global\" } = this.context.options;\n let compareNumber: number;\n\n if (typeof compareValue === \"number\") {\n compareNumber = compareValue;\n this.context.translationParams.value = compareValue;\n } else {\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, compareValue);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.value = compareValue;\n\n compareNumber = Number(fieldValue);\n\n if (isNaN(compareNumber)) {\n return VALID_RULE;\n }\n }\n\n if (value > compareNumber) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Less than rule - value must be strictly less than maximum\n * Supports field names with sibling scope\n */\nexport const lessThanRule: SchemaRule<{\n value: number | string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"lessThan\",\n defaultErrorMessage: \"The :input must be less than :value\",\n async validate(value: any, context) {\n const { value: compareValue, scope = \"global\" } = this.context.options;\n let compareNumber: number;\n\n if (typeof compareValue === \"number\") {\n compareNumber = compareValue;\n this.context.translationParams.value = compareValue;\n } else {\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, compareValue);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.value = compareValue;\n\n compareNumber = Number(fieldValue);\n\n if (isNaN(compareNumber)) {\n return VALID_RULE;\n }\n }\n\n if (value < compareNumber) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Positive rule - value must be greater than 0\n */\nexport const positiveRule: SchemaRule = {\n name: \"positive\",\n defaultErrorMessage: \"The :input must be a positive number\",\n async validate(value: any, context) {\n if (value > 0) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Negative rule - value must be less than 0\n */\nexport const negativeRule: SchemaRule = {\n name: \"negative\",\n defaultErrorMessage: \"The :input must be a negative number\",\n async validate(value: any, context) {\n if (value < 0) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Odd rule - value must be an odd number\n */\nexport const oddRule: SchemaRule = {\n name: \"odd\",\n defaultErrorMessage: \"The :input must be an odd number\",\n async validate(value: any, context) {\n if (value % 2 !== 0) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Even rule - value must be an even number\n */\nexport const evenRule: SchemaRule = {\n name: \"even\",\n defaultErrorMessage: \"The :input must be an even number\",\n async validate(value: any, context) {\n if (value % 2 === 0) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Modulo rule - value must be divisible by given number\n */\nexport const moduloRule: SchemaRule<{ value: number }> = {\n name: \"modulo\",\n defaultErrorMessage: \"The :input must be divisible by :value\",\n async validate(value: any, context) {\n if (value % this.context.options.value === 0) {\n return VALID_RULE;\n }\n\n this.context.translationParams.value = this.context.options.value;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Between rule - value must be between the given two numbers (Inclusive)\n * Supports field names with sibling scope\n */\nexport const betweenNumbersRule: SchemaRule<{\n min: number | string;\n max: number | string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"betweenNumbers\",\n defaultErrorMessage: \"The :input must be between :min and :max\",\n async validate(value: any, context) {\n const { min, max, scope = \"global\" } = this.context.options;\n\n // Extract min value\n let compareMin: number;\n if (typeof min === \"number\") {\n compareMin = min;\n this.context.translationParams.min = min;\n } else {\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, min);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.min = min;\n\n compareMin = Number(fieldValue);\n if (isNaN(compareMin)) {\n return VALID_RULE;\n }\n }\n\n // Extract max value\n let compareMax: number;\n if (typeof max === \"number\") {\n compareMax = max;\n this.context.translationParams.max = max;\n } else {\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, max);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.max = max;\n\n compareMax = Number(fieldValue);\n if (isNaN(compareMax)) {\n return VALID_RULE;\n }\n }\n\n if (value >= compareMin && value <= compareMax) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,UAGR;CACH,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,KAAK,QAAQ,aAAa,KAAK,QAAQ;EAC/C,IAAI;EAEJ,IAAI,OAAO,QAAQ,UAAU;GAC3B,aAAa;GACb,KAAK,QAAQ,kBAAkB,MAAM;EACvC,OAAO;GAEL,MAAM,aAAa,IADJ,UAAU,YAAY,QAAQ,SAAS,QAAQ,WAC/B,GAAG;GAElC,IAAI,eAAe,QACjB,OAAO;GAGT,KAAK,QAAQ,mBAAmB,MAAM;GAEtC,aAAa,OAAO,UAAU;GAE9B,IAAI,MAAM,UAAU,GAClB,OAAO;EAEX;EAEA,IAAI,SAAS,YACX,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;;AAMA,MAAa,UAGR;CACH,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,KAAK,QAAQ,aAAa,KAAK,QAAQ;EAC/C,IAAI;EAEJ,IAAI,OAAO,QAAQ,UAAU;GAC3B,aAAa;GACb,KAAK,QAAQ,kBAAkB,MAAM;EACvC,OAAO;GAEL,MAAM,aAAa,IADJ,UAAU,YAAY,QAAQ,SAAS,QAAQ,WAC/B,GAAG;GAElC,IAAI,eAAe,QACjB,OAAO;GAGT,KAAK,QAAQ,mBAAmB,MAAM;GAEtC,aAAa,OAAO,UAAU;GAE9B,IAAI,MAAM,UAAU,GAClB,OAAO;EAEX;EAEA,IAAI,SAAS,YACX,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;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,SAAS,QAAQ,WAC/B,GAAG;GAElC,IAAI,eAAe,QACjB,OAAO;GAGT,KAAK,QAAQ,mBAAmB,MAAM;GAEtC,aAAa,OAAO,UAAU;GAC9B,IAAI,MAAM,UAAU,GAClB,OAAO;EAEX;EAEA,IAAI,SAAS,cAAc,SAAS,YAClC,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"number-rules.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/number/number-rules.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Min rule - value must be equal or greater than minimum\n * Supports field names with sibling scope\n */\nexport const minRule: SchemaRule<{\n min: number | string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"min\",\n defaultErrorMessage: \"The :input must be at least :min\",\n async validate(value: any, context) {\n const { min, scope = \"global\" } = this.context.options;\n let compareMin: number;\n\n if (typeof min === \"number\") {\n compareMin = min;\n this.context.translationParams.min = min;\n } else {\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, min);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.min = min;\n\n compareMin = Number(fieldValue);\n\n if (isNaN(compareMin)) {\n return VALID_RULE;\n }\n }\n\n if (value >= compareMin) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Max rule - value must be equal or less than maximum\n * Supports field names with sibling scope\n */\nexport const maxRule: SchemaRule<{\n max: number | string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"max\",\n defaultErrorMessage: \"The :input must equal to or less than :max\",\n async validate(value: any, context) {\n const { max, scope = \"global\" } = this.context.options;\n let compareMax: number;\n\n if (typeof max === \"number\") {\n compareMax = max;\n this.context.translationParams.max = max;\n } else {\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, max);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.max = max;\n\n compareMax = Number(fieldValue);\n\n if (isNaN(compareMax)) {\n return VALID_RULE;\n }\n }\n\n if (value <= compareMax) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Greater than rule - value must be strictly greater than minimum\n * Supports field names with sibling scope\n */\nexport const greaterThanRule: SchemaRule<{\n value: number | string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"greaterThan\",\n defaultErrorMessage: \"The :input must be greater than :value\",\n async validate(value: any, context) {\n const { value: compareValue, scope = \"global\" } = this.context.options;\n let compareNumber: number;\n\n if (typeof compareValue === \"number\") {\n compareNumber = compareValue;\n this.context.translationParams.value = compareValue;\n } else {\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, compareValue);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.value = compareValue;\n\n compareNumber = Number(fieldValue);\n\n if (isNaN(compareNumber)) {\n return VALID_RULE;\n }\n }\n\n if (value > compareNumber) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Less than rule - value must be strictly less than maximum\n * Supports field names with sibling scope\n */\nexport const lessThanRule: SchemaRule<{\n value: number | string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"lessThan\",\n defaultErrorMessage: \"The :input must be less than :value\",\n async validate(value: any, context) {\n const { value: compareValue, scope = \"global\" } = this.context.options;\n let compareNumber: number;\n\n if (typeof compareValue === \"number\") {\n compareNumber = compareValue;\n this.context.translationParams.value = compareValue;\n } else {\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, compareValue);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.value = compareValue;\n\n compareNumber = Number(fieldValue);\n\n if (isNaN(compareNumber)) {\n return VALID_RULE;\n }\n }\n\n if (value < compareNumber) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Positive rule - value must be greater than 0\n */\nexport const positiveRule: SchemaRule = {\n name: \"positive\",\n defaultErrorMessage: \"The :input must be a positive number\",\n async validate(value: any, context) {\n if (value > 0) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Negative rule - value must be less than 0\n */\nexport const negativeRule: SchemaRule = {\n name: \"negative\",\n defaultErrorMessage: \"The :input must be a negative number\",\n async validate(value: any, context) {\n if (value < 0) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Odd rule - value must be an odd number\n */\nexport const oddRule: SchemaRule = {\n name: \"odd\",\n defaultErrorMessage: \"The :input must be an odd number\",\n async validate(value: any, context) {\n if (value % 2 !== 0) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Even rule - value must be an even number\n */\nexport const evenRule: SchemaRule = {\n name: \"even\",\n defaultErrorMessage: \"The :input must be an even number\",\n async validate(value: any, context) {\n if (value % 2 === 0) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Modulo rule - value must be divisible by given number\n */\nexport const moduloRule: SchemaRule<{ value: number }> = {\n name: \"modulo\",\n defaultErrorMessage: \"The :input must be divisible by :value\",\n async validate(value: any, context) {\n if (value % this.context.options.value === 0) {\n return VALID_RULE;\n }\n\n this.context.translationParams.value = this.context.options.value;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Between rule - value must be between the given two numbers (Inclusive)\n * Supports field names with sibling scope\n */\nexport const betweenNumbersRule: SchemaRule<{\n min: number | string;\n max: number | string;\n scope?: \"global\" | \"sibling\";\n}> = {\n name: \"betweenNumbers\",\n defaultErrorMessage: \"The :input must be between :min and :max\",\n async validate(value: any, context) {\n const { min, max, scope = \"global\" } = this.context.options;\n\n // Extract min value\n let compareMin: number;\n if (typeof min === \"number\") {\n compareMin = min;\n this.context.translationParams.min = min;\n } else {\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, min);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.min = min;\n\n compareMin = Number(fieldValue);\n if (isNaN(compareMin)) {\n return VALID_RULE;\n }\n }\n\n // Extract max value\n let compareMax: number;\n if (typeof max === \"number\") {\n compareMax = max;\n this.context.translationParams.max = max;\n } else {\n const source = scope === \"sibling\" ? context.parent : context.allValues;\n const fieldValue = get(source, max);\n\n if (fieldValue === undefined) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.max = max;\n\n compareMax = Number(fieldValue);\n if (isNaN(compareMax)) {\n return VALID_RULE;\n }\n }\n\n if (value >= compareMin && value <= compareMax) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,UAGR;CACH,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,KAAK,QAAQ,aAAa,KAAK,QAAQ;EAC/C,IAAI;EAEJ,IAAI,OAAO,QAAQ,UAAU;GAC3B,aAAa;GACb,KAAK,QAAQ,kBAAkB,MAAM;EACvC,OAAO;GAEL,MAAM,aAAa,IADJ,UAAU,YAAY,QAAQ,SAAS,QAAQ,WAC/B,GAAG;GAElC,IAAI,eAAe,QACjB,OAAO;GAGT,KAAK,QAAQ,mBAAmB,MAAM;GAEtC,aAAa,OAAO,UAAU;GAE9B,IAAI,MAAM,UAAU,GAClB,OAAO;EAEX;EAEA,IAAI,SAAS,YACX,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;;AAMA,MAAa,UAGR;CACH,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,KAAK,QAAQ,aAAa,KAAK,QAAQ;EAC/C,IAAI;EAEJ,IAAI,OAAO,QAAQ,UAAU;GAC3B,aAAa;GACb,KAAK,QAAQ,kBAAkB,MAAM;EACvC,OAAO;GAEL,MAAM,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Ae,QACjB,OAAO;GAGT,KAAK,QAAQ,mBAAmB,MAAM;GAEtC,aAAa,OAAO,UAAU;GAC9B,IAAI,MAAM,UAAU,GAClB,OAAO;EAEX;EAGA,IAAI;EACJ,IAAI,OAAO,QAAQ,UAAU;GAC3B,aAAa;GACb,KAAK,QAAQ,kBAAkB,MAAM;EACvC,OAAO;GAEL,MAAM,aAAa,IADJ,UAAU,YAAY,QAAQ,SAAS,QAAQ,WAC/B,GAAG;GAElC,IAAI,eAAe,QACjB,OAAO;GAGT,KAAK,QAAQ,mBAAmB,MAAM;GAEtC,aAAa,OAAO,UAAU;GAC9B,IAAI,MAAM,UAAU,GAClB,OAAO;EAEX;EAEA,IAAI,SAAS,cAAc,SAAS,YAClC,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -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/scalar/accepted-rule.ts
6
+ //#region ../../packages/seal/src/rules/scalar/accepted-rule.ts
7
7
  /**
8
8
  * The full set of values treated as "accepted" by `acceptedRule` and its
9
9
  * conditional variants. Shared with `formBooleanMutator` (see
@@ -1 +1 @@
1
- {"version":3,"file":"accepted-rule.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/scalar/accepted-rule.ts"],"sourcesContent":["import { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * The full set of values treated as \"accepted\" by `acceptedRule` and its\n * conditional variants. Shared with `formBooleanMutator` (see\n * `../../mutators/boolean-mutators`) so `v.boolean().accepted()` recognizes\n * exactly this list — single source of truth, no duplicated literals.\n */\nexport const ACCEPTED_VALUES: readonly unknown[] = [\n \"1\",\n \"true\",\n \"yes\",\n \"y\",\n \"on\",\n 1,\n true,\n \"Yes\",\n \"Y\",\n \"On\",\n];\n\nconst isAcceptedValue = (value: any) => {\n return ACCEPTED_VALUES.includes(value);\n};\n\n/**\n * Validate value as accepted if it equals:\n * 1 | \"1\" | true | \"true\" | \"yes\" | \"y\" | \"on\"\n */\nexport const acceptedRule: SchemaRule = {\n name: \"accepted\",\n defaultErrorMessage: \"The :input must be accepted\",\n description:\n \"The value must be accepted if it equals: 1 | '1' | true | 'true' | 'yes' | 'y' | 'on' | 1 | true | 'Yes' | 'Y' | 'On'\",\n async validate(value: any, context) {\n if (isAcceptedValue(value)) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Accepted value if another field's value equals to a specific value\n */\nexport const acceptedIfRule: SchemaRule<{ field: string; value: any }> = {\n name: \"acceptedIf\",\n description: \"The field must be accepted if :field's value equals to :value\",\n defaultErrorMessage: \"The :input must be accepted\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n const { value: expectedValue } = this.context.options;\n\n this.context.translatableParams.field = this.context.options.field;\n this.context.translatableParams.value = this.context.options.value;\n if (fieldValue !== expectedValue) {\n return invalidRule(this, context);\n }\n\n if (!isAcceptedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Accepted if another field is not equal to the given value\n */\nexport const acceptedUnlessRule: SchemaRule<{ field: string; value: any }> = {\n name: \"acceptedUnless\",\n description: \"The field must be accepted if :field's value is not equal to :value\",\n defaultErrorMessage: \"The :input must be accepted\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n const { value: expectedValue } = this.context.options;\n\n this.context.translatableParams.field = this.context.options.field;\n this.context.translatableParams.value = this.context.options.value;\n\n if (fieldValue === expectedValue) {\n return invalidRule(this, context);\n }\n\n if (!isAcceptedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Accepted if another field is required\n */\nexport const acceptedIfRequiredRule: SchemaRule<{ field: string }> = {\n name: \"acceptedIfRequired\",\n description: \"The field must be accepted if :field is required\",\n defaultErrorMessage: \"The :input must be accepted\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n this.context.translatableParams.field = this.context.options.field;\n\n if (isEmptyValue(fieldValue)) {\n return invalidRule(this, context);\n }\n\n if (!isAcceptedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Accepted if another field is present\n */\nexport const acceptedIfPresentRule: SchemaRule<{ field: string }> = {\n name: \"acceptedIfPresent\",\n description: \"The field must be accepted if :field is present\",\n defaultErrorMessage: \"The :input must be accepted\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n this.context.translatableParams.field = this.context.options.field;\n\n if (fieldValue === undefined) {\n return invalidRule(this, context);\n }\n\n if (!isAcceptedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Accepted if another field is missing\n */\nexport const acceptedWithoutRule: SchemaRule<{ field: string }> = {\n name: \"acceptedWithout\",\n description: \"The field must be accepted if :field is missing\",\n defaultErrorMessage: \"The :input must be accepted\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n this.context.translatableParams.field = this.context.options.field;\n\n if (fieldValue !== undefined) {\n return invalidRule(this, context);\n }\n\n if (!isAcceptedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;;AAUA,MAAa,kBAAsC;CACjD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,mBAAmB,UAAe;CACtC,OAAO,gBAAgB,SAAS,KAAK;AACvC;;;;;AAMA,MAAa,eAA2B;CACtC,MAAM;CACN,qBAAqB;CACrB,aACE;CACF,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,gBAAgB,KAAK,GACvB,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,iBAA4D;CACvE,MAAM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MAAM,aAAa,cAAc,MAAM,OAAO;EAC9C,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,IAAI,eAAe,QACjB,OAAO,YAAY,MAAM,OAAO;EAGlC,IAAI,CAAC,gBAAgB,KAAK,GACxB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;AAKA,MAAa,sBAAqD;CAChE,MAAM;CACN,aAAa;CACb,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAC9C,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,IAAI,eAAe,QACjB,OAAO,YAAY,MAAM,OAAO;EAGlC,IAAI,CAAC,gBAAgB,KAAK,GACxB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"accepted-rule.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/scalar/accepted-rule.ts"],"sourcesContent":["import { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * The full set of values treated as \"accepted\" by `acceptedRule` and its\n * conditional variants. Shared with `formBooleanMutator` (see\n * `../../mutators/boolean-mutators`) so `v.boolean().accepted()` recognizes\n * exactly this list — single source of truth, no duplicated literals.\n */\nexport const ACCEPTED_VALUES: readonly unknown[] = [\n \"1\",\n \"true\",\n \"yes\",\n \"y\",\n \"on\",\n 1,\n true,\n \"Yes\",\n \"Y\",\n \"On\",\n];\n\nconst isAcceptedValue = (value: any) => {\n return ACCEPTED_VALUES.includes(value);\n};\n\n/**\n * Validate value as accepted if it equals:\n * 1 | \"1\" | true | \"true\" | \"yes\" | \"y\" | \"on\"\n */\nexport const acceptedRule: SchemaRule = {\n name: \"accepted\",\n defaultErrorMessage: \"The :input must be accepted\",\n description:\n \"The value must be accepted if it equals: 1 | '1' | true | 'true' | 'yes' | 'y' | 'on' | 1 | true | 'Yes' | 'Y' | 'On'\",\n async validate(value: any, context) {\n if (isAcceptedValue(value)) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Accepted value if another field's value equals to a specific value\n */\nexport const acceptedIfRule: SchemaRule<{ field: string; value: any }> = {\n name: \"acceptedIf\",\n description: \"The field must be accepted if :field's value equals to :value\",\n defaultErrorMessage: \"The :input must be accepted\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n const { value: expectedValue } = this.context.options;\n\n this.context.translatableParams.field = this.context.options.field;\n this.context.translatableParams.value = this.context.options.value;\n if (fieldValue !== expectedValue) {\n return invalidRule(this, context);\n }\n\n if (!isAcceptedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Accepted if another field is not equal to the given value\n */\nexport const acceptedUnlessRule: SchemaRule<{ field: string; value: any }> = {\n name: \"acceptedUnless\",\n description: \"The field must be accepted if :field's value is not equal to :value\",\n defaultErrorMessage: \"The :input must be accepted\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n const { value: expectedValue } = this.context.options;\n\n this.context.translatableParams.field = this.context.options.field;\n this.context.translatableParams.value = this.context.options.value;\n\n if (fieldValue === expectedValue) {\n return invalidRule(this, context);\n }\n\n if (!isAcceptedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Accepted if another field is required\n */\nexport const acceptedIfRequiredRule: SchemaRule<{ field: string }> = {\n name: \"acceptedIfRequired\",\n description: \"The field must be accepted if :field is required\",\n defaultErrorMessage: \"The :input must be accepted\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n this.context.translatableParams.field = this.context.options.field;\n\n if (isEmptyValue(fieldValue)) {\n return invalidRule(this, context);\n }\n\n if (!isAcceptedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Accepted if another field is present\n */\nexport const acceptedIfPresentRule: SchemaRule<{ field: string }> = {\n name: \"acceptedIfPresent\",\n description: \"The field must be accepted if :field is present\",\n defaultErrorMessage: \"The :input must be accepted\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n this.context.translatableParams.field = this.context.options.field;\n\n if (fieldValue === undefined) {\n return invalidRule(this, context);\n }\n\n if (!isAcceptedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Accepted if another field is missing\n */\nexport const acceptedWithoutRule: SchemaRule<{ field: string }> = {\n name: \"acceptedWithout\",\n description: \"The field must be accepted if :field is missing\",\n defaultErrorMessage: \"The :input must be accepted\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n this.context.translatableParams.field = this.context.options.field;\n\n if (fieldValue !== undefined) {\n return invalidRule(this, context);\n }\n\n if (!isAcceptedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;;AAUA,MAAa,kBAAsC;CACjD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,mBAAmB,UAAe;CACtC,OAAO,gBAAgB,SAAS,KAAK;AACvC;;;;;AAMA,MAAa,eAA2B;CACtC,MAAM;CACN,qBAAqB;CACrB,aACE;CACF,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,gBAAgB,KAAK,GACvB,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,iBAA4D;CACvE,MAAM;CACN,aAAa;CACb,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAC9C,MAAM,EAAE,OAAO,kBAAkB,KAAK,QAAQ;EAE9C,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAC7D,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAC7D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;CACN,aAAa;CACb,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAC9C,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,IAAI,eAAe,QACjB,OAAO,YAAY,MAAM,OAAO;EAGlC,IAAI,CAAC,gBAAgB,KAAK,GACxB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
@@ -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/scalar/declined-rule.ts
6
+ //#region ../../packages/seal/src/rules/scalar/declined-rule.ts
7
7
  /**
8
8
  * The full set of values treated as "declined" by `declinedRule` and its
9
9
  * conditional variants. Shared with `formBooleanMutator` (see
@@ -1 +1 @@
1
- {"version":3,"file":"declined-rule.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/scalar/declined-rule.ts"],"sourcesContent":["import { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * The full set of values treated as \"declined\" by `declinedRule` and its\n * conditional variants. Shared with `formBooleanMutator` (see\n * `../../mutators/boolean-mutators`) so `v.boolean().declined()` recognizes\n * exactly this list — single source of truth, no duplicated literals.\n */\nexport const DECLINED_VALUES: readonly unknown[] = [\n \"0\",\n \"false\",\n \"no\",\n \"n\",\n \"off\",\n 0,\n false,\n \"No\",\n \"N\",\n \"Off\",\n];\n\nconst isDeclinedValue = (value: any) => {\n return DECLINED_VALUES.includes(value);\n};\n\n/**\n * Validate value as declined if it equals:\n * 0 | \"0\" | false | \"false\" | \"no\" | \"n\" | \"off\" | 0 | false | \"No\" | \"N\" | \"Off\"\n */\nexport const declinedRule: SchemaRule = {\n name: \"declined\",\n defaultErrorMessage: \"The :input must be declined\",\n description:\n \"The value must be declined if it equals: 0 | '0' | false | 'false' | 'no' | 'n' | 'off' | 0 | false | 'No' | 'N' | 'Off'\",\n async validate(value: any, context) {\n if (isDeclinedValue(value)) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Declined value if another field's value equals to a specific value\n */\nexport const declinedIfRule: SchemaRule<{ field: string; value: any }> = {\n name: \"declinedIf\",\n description: \"The field must be declined if :field's value equals to :value\",\n defaultErrorMessage: \"The :input must be declined\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n const { value: expectedValue } = this.context.options;\n\n this.context.translatableParams.field = this.context.options.field;\n this.context.translatableParams.value = this.context.options.value;\n\n if (fieldValue !== expectedValue) {\n return invalidRule(this, context);\n }\n\n if (!isDeclinedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Declined if another field is not equal to the given value\n */\nexport const declinedUnlessRule: SchemaRule<{ field: string; value: any }> = {\n name: \"declinedUnless\",\n description: \"The field must be declined if :field's value is not equal to :value\",\n defaultErrorMessage: \"The :input must be declined\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n const { value: expectedValue } = this.context.options;\n\n this.context.translatableParams.field = this.context.options.field;\n this.context.translatableParams.value = this.context.options.value;\n if (fieldValue === expectedValue) {\n return invalidRule(this, context);\n }\n\n if (!isDeclinedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Declined if another field is required\n */\nexport const declinedIfRequiredRule: SchemaRule<{ field: string }> = {\n name: \"declinedIfRequired\",\n description: \"The field must be declined if :field is required\",\n defaultErrorMessage: \"The :input must be declined\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n this.context.translatableParams.field = this.context.options.field;\n\n if (isEmptyValue(fieldValue)) {\n return invalidRule(this, context);\n }\n\n if (!isDeclinedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Declined if another field is present\n */\nexport const declinedIfPresentRule: SchemaRule<{ field: string }> = {\n name: \"declinedIfPresent\",\n description: \"The field must be declined if :field is present\",\n defaultErrorMessage: \"The :input must be declined\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n this.context.translatableParams.field = this.context.options.field;\n\n if (fieldValue === undefined) {\n return invalidRule(this, context);\n }\n\n if (!isDeclinedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Declined if another field is missing\n */\nexport const declinedWithoutRule: SchemaRule<{ field: string }> = {\n name: \"declinedWithout\",\n description: \"The field must be declined if :field is missing\",\n defaultErrorMessage: \"The :input must be declined\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n this.context.translatableParams.field = this.context.options.field;\n\n if (fieldValue !== undefined) {\n return invalidRule(this, context);\n }\n\n if (!isDeclinedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;;AAUA,MAAa,kBAAsC;CACjD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,mBAAmB,UAAe;CACtC,OAAO,gBAAgB,SAAS,KAAK;AACvC;;;;;AAMA,MAAa,eAA2B;CACtC,MAAM;CACN,qBAAqB;CACrB,aACE;CACF,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,gBAAgB,KAAK,GACvB,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,iBAA4D;CACvE,MAAM;CACN,aAAa;CACb,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAC9C,MAAM,EAAE,OAAO,kBAAkB,KAAK,QAAQ;EAE9C,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAC7D,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ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E,MAAM;CACN,aAAa;CACb,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAC9C,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,IAAI,eAAe,QACjB,OAAO,YAAY,MAAM,OAAO;EAGlC,IAAI,CAAC,gBAAgB,KAAK,GACxB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"declined-rule.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/scalar/declined-rule.ts"],"sourcesContent":["import { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * The full set of values treated as \"declined\" by `declinedRule` and its\n * conditional variants. Shared with `formBooleanMutator` (see\n * `../../mutators/boolean-mutators`) so `v.boolean().declined()` recognizes\n * exactly this list — single source of truth, no duplicated literals.\n */\nexport const DECLINED_VALUES: readonly unknown[] = [\n \"0\",\n \"false\",\n \"no\",\n \"n\",\n \"off\",\n 0,\n false,\n \"No\",\n \"N\",\n \"Off\",\n];\n\nconst isDeclinedValue = (value: any) => {\n return DECLINED_VALUES.includes(value);\n};\n\n/**\n * Validate value as declined if it equals:\n * 0 | \"0\" | false | \"false\" | \"no\" | \"n\" | \"off\" | 0 | false | \"No\" | \"N\" | \"Off\"\n */\nexport const declinedRule: SchemaRule = {\n name: \"declined\",\n defaultErrorMessage: \"The :input must be declined\",\n description:\n \"The value must be declined if it equals: 0 | '0' | false | 'false' | 'no' | 'n' | 'off' | 0 | false | 'No' | 'N' | 'Off'\",\n async validate(value: any, context) {\n if (isDeclinedValue(value)) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Declined value if another field's value equals to a specific value\n */\nexport const declinedIfRule: SchemaRule<{ field: string; value: any }> = {\n name: \"declinedIf\",\n description: \"The field must be declined if :field's value equals to :value\",\n defaultErrorMessage: \"The :input must be declined\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n const { value: expectedValue } = this.context.options;\n\n this.context.translatableParams.field = this.context.options.field;\n this.context.translatableParams.value = this.context.options.value;\n\n if (fieldValue !== expectedValue) {\n return invalidRule(this, context);\n }\n\n if (!isDeclinedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Declined if another field is not equal to the given value\n */\nexport const declinedUnlessRule: SchemaRule<{ field: string; value: any }> = {\n name: \"declinedUnless\",\n description: \"The field must be declined if :field's value is not equal to :value\",\n defaultErrorMessage: \"The :input must be declined\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n const { value: expectedValue } = this.context.options;\n\n this.context.translatableParams.field = this.context.options.field;\n this.context.translatableParams.value = this.context.options.value;\n if (fieldValue === expectedValue) {\n return invalidRule(this, context);\n }\n\n if (!isDeclinedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Declined if another field is required\n */\nexport const declinedIfRequiredRule: SchemaRule<{ field: string }> = {\n name: \"declinedIfRequired\",\n description: \"The field must be declined if :field is required\",\n defaultErrorMessage: \"The :input must be declined\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n this.context.translatableParams.field = this.context.options.field;\n\n if (isEmptyValue(fieldValue)) {\n return invalidRule(this, context);\n }\n\n if (!isDeclinedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Declined if another field is present\n */\nexport const declinedIfPresentRule: SchemaRule<{ field: string }> = {\n name: \"declinedIfPresent\",\n description: \"The field must be declined if :field is present\",\n defaultErrorMessage: \"The :input must be declined\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n this.context.translatableParams.field = this.context.options.field;\n\n if (fieldValue === undefined) {\n return invalidRule(this, context);\n }\n\n if (!isDeclinedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n\n/**\n * Declined if another field is missing\n */\nexport const declinedWithoutRule: SchemaRule<{ field: string }> = {\n name: \"declinedWithout\",\n description: \"The field must be declined if :field is missing\",\n defaultErrorMessage: \"The :input must be declined\",\n async validate(value: any, context) {\n const fieldValue = getFieldValue(this, context);\n this.context.translatableParams.field = this.context.options.field;\n\n if (fieldValue !== undefined) {\n return invalidRule(this, context);\n }\n\n if (!isDeclinedValue(value)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;;AAUA,MAAa,kBAAsC;CACjD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,mBAAmB,UAAe;CACtC,OAAO,gBAAgB,SAAS,KAAK;AACvC;;;;;AAMA,MAAa,eAA2B;CACtC,MAAM;CACN,qBAAqB;CACrB,aACE;CACF,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,gBAAgB,KAAK,GACvB,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,iBAA4D;CACvE,MAAM;CACN,aAAa;CACb,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAC9C,MAAM,EAAE,OAAO,kBAAkB,KAAK,QAAQ;EAE9C,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAC7D,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,IAAI,eAAe,eACjB,OAAO,YAAY,MAAM,OAAO;EAGlC,IAAI,CAAC,gBAAgB,KAAK,GACxB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;AAKA,MAAa,qBAAgE;CAC3E,MAAM;CACN,aAAa;CACb,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAC9C,MAAM,EAAE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ACT;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/string/alpha.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/string/alpha.d.ts
3
4
  /**
4
5
  * Alpha rule - allows only alphabetic characters
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/string/alpha.ts"],"mappings":";;;;;cAMa,SAAA,EAAW,UASvB;;;;cAKY,gBAAA,EAAkB,UAS9B;AATD;;;AAAA,cAca,aAAA,EAAe,UAS3B"}
1
+ {"version":3,"file":"alpha.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/alpha.ts"],"mappings":";;;;;AAMA;cAAa,SAAA,EAAW,UASvB;;;AAAA;cAKY,gBAAA,EAAkB,UAS9B;;;;cAKY,aAAA,EAAe,UAS3B"}
@@ -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/string/alpha.ts
4
+ //#region ../../packages/seal/src/rules/string/alpha.ts
5
5
  /**
6
6
  * Alpha rule - allows only alphabetic characters
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/string/alpha.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Alpha rule - allows only alphabetic characters\n */\nexport const alphaRule: SchemaRule = {\n name: \"alpha\",\n defaultErrorMessage: \"The :input must contain only alphabetic characters\",\n async validate(value: any, context) {\n if (/^[a-zA-Z]+$/.test(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * AlphaNumeric rule - allows only alphanumeric characters\n */\nexport const alphaNumericRule: SchemaRule = {\n name: \"alphaNumeric\",\n defaultErrorMessage: \"The :input must contain only alphanumeric characters\",\n async validate(value: any, context) {\n if (/^[a-zA-Z0-9]+$/.test(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Numeric string rule - allows only numeric characters\n */\nexport const isNumericRule: SchemaRule = {\n name: \"numeric\",\n defaultErrorMessage: \"The :input must contain only numeric characters\",\n async validate(value: any, context) {\n if (/^[0-9]+$/.test(String(value))) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,YAAwB;CACnC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,cAAc,KAAK,KAAK,GAC1B,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,mBAA+B;CAC1C,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,iBAAiB,KAAK,KAAK,GAC7B,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,gBAA4B;CACvC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,WAAW,KAAK,OAAO,KAAK,CAAC,GAC/B,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"alpha.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/alpha.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Alpha rule - allows only alphabetic characters\n */\nexport const alphaRule: SchemaRule = {\n name: \"alpha\",\n defaultErrorMessage: \"The :input must contain only alphabetic characters\",\n async validate(value: any, context) {\n if (/^[a-zA-Z]+$/.test(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * AlphaNumeric rule - allows only alphanumeric characters\n */\nexport const alphaNumericRule: SchemaRule = {\n name: \"alphaNumeric\",\n defaultErrorMessage: \"The :input must contain only alphanumeric characters\",\n async validate(value: any, context) {\n if (/^[a-zA-Z0-9]+$/.test(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * Numeric string rule - allows only numeric characters\n */\nexport const isNumericRule: SchemaRule = {\n name: \"numeric\",\n defaultErrorMessage: \"The :input must contain only numeric characters\",\n async validate(value: any, context) {\n if (/^[0-9]+$/.test(String(value))) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,YAAwB;CACnC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,cAAc,KAAK,KAAK,GAC1B,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,mBAA+B;CAC1C,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,iBAAiB,KAAK,KAAK,GAC7B,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,gBAA4B;CACvC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,WAAW,KAAK,OAAO,KAAK,CAAC,GAC/B,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/string/credit-card.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/string/credit-card.d.ts
3
4
  /**
4
5
  * Credit card rule - validates credit card number
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"credit-card.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/string/credit-card.ts"],"mappings":";;;;;cAMa,gBAAA,EAAkB,UAkC9B"}
1
+ {"version":3,"file":"credit-card.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/credit-card.ts"],"mappings":";;;;;AAMA;cAAa,gBAAA,EAAkB,UAkC9B"}
@@ -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/string/credit-card.ts
4
+ //#region ../../packages/seal/src/rules/string/credit-card.ts
5
5
  /**
6
6
  * Credit card rule - validates credit card number
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"credit-card.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/string/credit-card.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Credit card rule - validates credit card number\n */\nexport const isCreditCardRule: SchemaRule = {\n name: \"creditCard\",\n defaultErrorMessage: \"The :input must be a valid credit card number\",\n async validate(value: any, context) {\n // Luhn algorithm for credit card validation\n const cardNumber = String(value).replace(/\\s/g, \"\");\n\n if (!/^\\d+$/.test(cardNumber)) {\n return invalidRule(this, context);\n }\n\n let sum = 0;\n let isEven = false;\n\n for (let i = cardNumber.length - 1; i >= 0; i--) {\n let digit = parseInt(cardNumber.charAt(i), 10);\n\n if (isEven) {\n digit *= 2;\n if (digit > 9) {\n digit -= 9;\n }\n }\n\n sum += digit;\n isEven = !isEven;\n }\n\n if (sum % 10 === 0) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,mBAA+B;CAC1C,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAElC,MAAM,aAAa,OAAO,KAAK,CAAC,CAAC,QAAQ,OAAO,EAAE;EAElD,IAAI,CAAC,QAAQ,KAAK,UAAU,GAC1B,OAAO,YAAY,MAAM,OAAO;EAGlC,IAAI,MAAM;EACV,IAAI,SAAS;EAEb,KAAK,IAAI,IAAI,WAAW,SAAS,GAAG,KAAK,GAAG,KAAK;GAC/C,IAAI,QAAQ,SAAS,WAAW,OAAO,CAAC,GAAG,EAAE;GAE7C,IAAI,QAAQ;IACV,SAAS;IACT,IAAI,QAAQ,GACV,SAAS;GAEb;GAEA,OAAO;GACP,SAAS,CAAC;EACZ;EAEA,IAAI,MAAM,OAAO,GACf,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"credit-card.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/credit-card.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Credit card rule - validates credit card number\n */\nexport const isCreditCardRule: SchemaRule = {\n name: \"creditCard\",\n defaultErrorMessage: \"The :input must be a valid credit card number\",\n async validate(value: any, context) {\n // Luhn algorithm for credit card validation\n const cardNumber = String(value).replace(/\\s/g, \"\");\n\n if (!/^\\d+$/.test(cardNumber)) {\n return invalidRule(this, context);\n }\n\n let sum = 0;\n let isEven = false;\n\n for (let i = cardNumber.length - 1; i >= 0; i--) {\n let digit = parseInt(cardNumber.charAt(i), 10);\n\n if (isEven) {\n digit *= 2;\n if (digit > 9) {\n digit -= 9;\n }\n }\n\n sum += digit;\n isEven = !isEven;\n }\n\n if (sum % 10 === 0) {\n return VALID_RULE;\n }\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,mBAA+B;CAC1C,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAElC,MAAM,aAAa,OAAO,KAAK,CAAC,CAAC,QAAQ,OAAO,EAAE;EAElD,IAAI,CAAC,QAAQ,KAAK,UAAU,GAC1B,OAAO,YAAY,MAAM,OAAO;EAGlC,IAAI,MAAM;EACV,IAAI,SAAS;EAEb,KAAK,IAAI,IAAI,WAAW,SAAS,GAAG,KAAK,GAAG,KAAK;GAC/C,IAAI,QAAQ,SAAS,WAAW,OAAO,CAAC,GAAG,EAAE;GAE7C,IAAI,QAAQ;IACV,SAAS;IACT,IAAI,QAAQ,GACV,SAAS;GAEb;GAEA,OAAO;GACP,SAAS,CAAC;EACZ;EAEA,IAAI,MAAM,OAAO,GACf,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/string/email.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/string/email.d.ts
3
4
  /**
4
5
  * Email rule - validates email format
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"email.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/string/email.ts"],"mappings":";;;;;cAOa,SAAA,EAAW,UASvB"}
1
+ {"version":3,"file":"email.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/email.ts"],"mappings":";;;;;AAOA;cAAa,SAAA,EAAW,UASvB"}
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
2
2
  import "../../helpers/index.mjs";
3
3
  import { isEmail } from "@mongez/supportive-is";
4
4
 
5
- //#region ../seal/src/rules/string/email.ts
5
+ //#region ../../packages/seal/src/rules/string/email.ts
6
6
  /**
7
7
  * Email rule - validates email format
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"email.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/string/email.ts"],"sourcesContent":["import { isEmail } from \"@mongez/supportive-is\";\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Email rule - validates email format\n */\nexport const emailRule: SchemaRule = {\n name: \"email\",\n defaultErrorMessage: \"The :input must be a valid email address\",\n async validate(value: any, context) {\n if (isEmail(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;AAOA,MAAa,YAAwB;CACnC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,QAAQ,KAAK,GACf,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"email.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/email.ts"],"sourcesContent":["import { isEmail } from \"@mongez/supportive-is\";\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Email rule - validates email format\n */\nexport const emailRule: SchemaRule = {\n name: \"email\",\n defaultErrorMessage: \"The :input must be a valid email address\",\n async validate(value: any, context) {\n if (isEmail(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;AAOA,MAAa,YAAwB;CACnC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,QAAQ,KAAK,GACf,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/string/id-formats.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/string/id-formats.d.ts
3
4
  type UUIDVersion = 1 | 3 | 4 | 5 | 6 | 7;
4
5
  /**
5
6
  * UUID rule — value must be a valid UUID. Optionally restrict to a specific version.
@@ -1 +1 @@
1
- {"version":3,"file":"id-formats.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/string/id-formats.ts"],"mappings":";;KAuBY,WAAA;;;AAAZ;;;;AAAuB;AAUvB;cAAa,QAAA,EAAU,UAAU;EAAG,OAAA,GAAU,WAAA;AAAA;;;;;AAAW;AA8BzD;;;;AAA2C;AAqB3C;cArBa,QAAA,EAAU,UAAU;EAAG,OAAO;AAAA;AA6B1C;AAYD;;;;AAA4C;;;AAZ3C,cARY,QAAA,EAAU,UAQtB;;;;;;;;;;;cAYY,UAAA,EAAY,UAAU;EAAG,MAAM;AAAA"}
1
+ {"version":3,"file":"id-formats.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/id-formats.ts"],"mappings":";;;KAuBY,WAAA;;AAAZ;;;;AAAuB;AAUvB;;cAAa,QAAA,EAAU,UAAU;EAAG,OAAA,GAAU,WAAA;AAAA;;;;AAAW;AA8BzD;;;;AAA2C;AAqB3C;;cArBa,QAAA,EAAU,UAAU;EAAG,OAAO;AAAA;AAyC3C;;;;AAA4C;;;;AAA5C,cApBa,QAAA,EAAU,UAQtB;;;;;;;;;;;cAYY,UAAA,EAAY,UAAU;EAAG,MAAM;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/string/id-formats.ts
4
+ //#region ../../packages/seal/src/rules/string/id-formats.ts
5
5
  /**
6
6
  * Modern ID format validators — UUID, CUID, ULID, nanoid.
7
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"id-formats.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/string/id-formats.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Modern ID format validators — UUID, CUID, ULID, nanoid.\n *\n * Each rule asserts the value is a string in the canonical format for its\n * identifier scheme. Rules are intentionally strict (variant nibbles checked\n * for UUID, character classes enforced for ULID's Crockford base32, etc.)\n * so \"looks-like-but-not-valid\" inputs are rejected.\n */\n\nconst UUID_ANY = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n\nconst UUID_BY_VERSION: Record<1 | 3 | 4 | 5 | 6 | 7, RegExp> = {\n 1: /^[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n 3: /^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n 4: /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n 5: /^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n 6: /^[0-9a-f]{8}-[0-9a-f]{4}-6[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n 7: /^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n};\n\nexport type UUIDVersion = 1 | 3 | 4 | 5 | 6 | 7;\n\n/**\n * UUID rule — value must be a valid UUID. Optionally restrict to a specific version.\n *\n * @example\n * v.string().uuid() // any RFC 4122 UUID\n * v.string().uuid(4) // only v4 (random)\n * v.string().uuid(7) // only v7 (timestamp-ordered)\n */\nexport const uuidRule: SchemaRule<{ version?: UUIDVersion }> = {\n name: \"uuid\",\n defaultErrorMessage: \"The :input must be a valid UUID\",\n async validate(value, context) {\n if (typeof value !== \"string\") return invalidRule(this, context);\n\n const version = this.context.options.version;\n\n const pattern = version ? UUID_BY_VERSION[version] : UUID_ANY;\n if (pattern.test(value)) return VALID_RULE;\n\n if (version !== undefined) {\n this.context.translationParams.version = version;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * CUID rule — value must be a valid CUID.\n *\n * Defaults to CUID2 (24 chars, lowercase, starts with letter — see\n * https://github.com/paralleldrive/cuid2). Pass `{ version: 1 }` for legacy\n * CUID1 format (starts with \"c\", ≥25 chars).\n *\n * @example\n * v.string().cuid() // CUID2\n * v.string().cuid({ version: 1 }) // legacy CUID1\n */\nexport const cuidRule: SchemaRule<{ version?: 1 | 2 }> = {\n name: \"cuid\",\n defaultErrorMessage: \"The :input must be a valid CUID\",\n async validate(value, context) {\n if (typeof value !== \"string\") return invalidRule(this, context);\n const version = this.context.options.version ?? 2;\n const pattern = version === 1 ? /^c[a-z0-9]{24,}$/ : /^[a-z][a-z0-9]{23}$/;\n if (pattern.test(value)) return VALID_RULE;\n this.context.translationParams.version = version;\n return invalidRule(this, context);\n },\n};\n\n/**\n * ULID rule — value must be a valid ULID (26 chars, Crockford base32).\n *\n * Crockford base32 excludes the letters I, L, O, U to avoid ambiguity.\n *\n * @example\n * v.string().ulid()\n */\nexport const ulidRule: SchemaRule = {\n name: \"ulid\",\n defaultErrorMessage: \"The :input must be a valid ULID\",\n async validate(value, context) {\n if (typeof value !== \"string\") return invalidRule(this, context);\n if (/^[0-9A-HJKMNP-TV-Z]{26}$/.test(value)) return VALID_RULE;\n return invalidRule(this, context);\n },\n};\n\n/**\n * nanoid rule — value must be a valid nanoid string.\n *\n * Default length is 21 (standard nanoid). URL-safe alphabet:\n * A–Z, a–z, 0–9, `_`, `-`.\n *\n * @example\n * v.string().nanoid() // 21 chars (default)\n * v.string().nanoid(10) // 10 chars\n */\nexport const nanoidRule: SchemaRule<{ length?: number }> = {\n name: \"nanoid\",\n defaultErrorMessage: \"The :input must be a valid nanoid\",\n async validate(value, context) {\n if (typeof value !== \"string\") return invalidRule(this, context);\n const length = this.context.options.length ?? 21;\n const pattern = new RegExp(`^[A-Za-z0-9_-]{${length}}$`);\n if (pattern.test(value)) return VALID_RULE;\n this.context.translationParams.length = length;\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;;;;;AAYA,MAAM,WAAW;AAEjB,MAAM,kBAAyD;CAC7D,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL;;;;;;;;;AAYA,MAAa,WAAkD;CAC7D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAO,SAAS;EAC7B,IAAI,OAAO,UAAU,UAAU,OAAO,YAAY,MAAM,OAAO;EAE/D,MAAM,UAAU,KAAK,QAAQ,QAAQ;EAGrC,KADgB,UAAU,gBAAgB,WAAW,SAC1C,CAAC,KAAK,KAAK,GAAG,OAAO;EAEhC,IAAI,YAAY,QACd,KAAK,QAAQ,kBAAkB,UAAU;EAG3C,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;;;;;;;;;AAaA,MAAa,WAA4C;CACvD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAO,SAAS;EAC7B,IAAI,OAAO,UAAU,UAAU,OAAO,YAAY,MAAM,OAAO;EAC/D,MAAM,UAAU,KAAK,QAAQ,QAAQ,WAAW;EAEhD,KADgB,YAAY,IAAI,qBAAqB,sBAC1C,CAAC,KAAK,KAAK,GAAG,OAAO;EAChC,KAAK,QAAQ,kBAAkB,UAAU;EACzC,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;;;;;;AAUA,MAAa,WAAuB;CAClC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAO,SAAS;EAC7B,IAAI,OAAO,UAAU,UAAU,OAAO,YAAY,MAAM,OAAO;EAC/D,IAAI,2BAA2B,KAAK,KAAK,GAAG,OAAO;EACnD,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;;;;;;;;AAYA,MAAa,aAA8C;CACzD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAO,SAAS;EAC7B,IAAI,OAAO,UAAU,UAAU,OAAO,YAAY,MAAM,OAAO;EAC/D,MAAM,SAAS,KAAK,QAAQ,QAAQ,UAAU;EAE9C,IAAI,IADgB,OAAO,kBAAkB,OAAO,GAC1C,CAAC,CAAC,KAAK,KAAK,GAAG,OAAO;EAChC,KAAK,QAAQ,kBAAkB,SAAS;EACxC,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"id-formats.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/id-formats.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Modern ID format validators — UUID, CUID, ULID, nanoid.\n *\n * Each rule asserts the value is a string in the canonical format for its\n * identifier scheme. Rules are intentionally strict (variant nibbles checked\n * for UUID, character classes enforced for ULID's Crockford base32, etc.)\n * so \"looks-like-but-not-valid\" inputs are rejected.\n */\n\nconst UUID_ANY = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n\nconst UUID_BY_VERSION: Record<1 | 3 | 4 | 5 | 6 | 7, RegExp> = {\n 1: /^[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n 3: /^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n 4: /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n 5: /^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n 6: /^[0-9a-f]{8}-[0-9a-f]{4}-6[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n 7: /^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n};\n\nexport type UUIDVersion = 1 | 3 | 4 | 5 | 6 | 7;\n\n/**\n * UUID rule — value must be a valid UUID. Optionally restrict to a specific version.\n *\n * @example\n * v.string().uuid() // any RFC 4122 UUID\n * v.string().uuid(4) // only v4 (random)\n * v.string().uuid(7) // only v7 (timestamp-ordered)\n */\nexport const uuidRule: SchemaRule<{ version?: UUIDVersion }> = {\n name: \"uuid\",\n defaultErrorMessage: \"The :input must be a valid UUID\",\n async validate(value, context) {\n if (typeof value !== \"string\") return invalidRule(this, context);\n\n const version = this.context.options.version;\n\n const pattern = version ? UUID_BY_VERSION[version] : UUID_ANY;\n if (pattern.test(value)) return VALID_RULE;\n\n if (version !== undefined) {\n this.context.translationParams.version = version;\n }\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * CUID rule — value must be a valid CUID.\n *\n * Defaults to CUID2 (24 chars, lowercase, starts with letter — see\n * https://github.com/paralleldrive/cuid2). Pass `{ version: 1 }` for legacy\n * CUID1 format (starts with \"c\", ≥25 chars).\n *\n * @example\n * v.string().cuid() // CUID2\n * v.string().cuid({ version: 1 }) // legacy CUID1\n */\nexport const cuidRule: SchemaRule<{ version?: 1 | 2 }> = {\n name: \"cuid\",\n defaultErrorMessage: \"The :input must be a valid CUID\",\n async validate(value, context) {\n if (typeof value !== \"string\") return invalidRule(this, context);\n const version = this.context.options.version ?? 2;\n const pattern = version === 1 ? /^c[a-z0-9]{24,}$/ : /^[a-z][a-z0-9]{23}$/;\n if (pattern.test(value)) return VALID_RULE;\n this.context.translationParams.version = version;\n return invalidRule(this, context);\n },\n};\n\n/**\n * ULID rule — value must be a valid ULID (26 chars, Crockford base32).\n *\n * Crockford base32 excludes the letters I, L, O, U to avoid ambiguity.\n *\n * @example\n * v.string().ulid()\n */\nexport const ulidRule: SchemaRule = {\n name: \"ulid\",\n defaultErrorMessage: \"The :input must be a valid ULID\",\n async validate(value, context) {\n if (typeof value !== \"string\") return invalidRule(this, context);\n if (/^[0-9A-HJKMNP-TV-Z]{26}$/.test(value)) return VALID_RULE;\n return invalidRule(this, context);\n },\n};\n\n/**\n * nanoid rule — value must be a valid nanoid string.\n *\n * Default length is 21 (standard nanoid). URL-safe alphabet:\n * A–Z, a–z, 0–9, `_`, `-`.\n *\n * @example\n * v.string().nanoid() // 21 chars (default)\n * v.string().nanoid(10) // 10 chars\n */\nexport const nanoidRule: SchemaRule<{ length?: number }> = {\n name: \"nanoid\",\n defaultErrorMessage: \"The :input must be a valid nanoid\",\n async validate(value, context) {\n if (typeof value !== \"string\") return invalidRule(this, context);\n const length = this.context.options.length ?? 21;\n const pattern = new RegExp(`^[A-Za-z0-9_-]{${length}}$`);\n if (pattern.test(value)) return VALID_RULE;\n this.context.translationParams.length = length;\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;;;;;AAYA,MAAM,WAAW;AAEjB,MAAM,kBAAy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K,KAAK,GAAG,OAAO;EAChC,KAAK,QAAQ,kBAAkB,SAAS;EACxC,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/string/ip.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/string/ip.d.ts
3
4
  declare function isIPv4(value: string): boolean;
4
5
  declare function isIPv6(value: string): boolean;
5
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ip.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/string/ip.ts"],"mappings":";;iBA0BgB,MAAA,CAAO,KAAa;AAAA,iBAIpB,MAAA,CAAO,KAAa;;AAJpC;;;iBAYgB,IAAA,CAAK,KAAa;AAZE;AAIpC;;AAJoC,cAqBvB,MAAA,EAAQ,UASpB;;AA1BmC;AAQpC;cAuBa,OAAA,EAAS,UASrB;;;AAhCiC;cAqCrB,OAAA,EAAS,UASrB"}
1
+ {"version":3,"file":"ip.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/ip.ts"],"mappings":";;;iBA0BgB,MAAA,CAAO,KAAa;AAAA,iBAIpB,MAAA,CAAO,KAAa;AAJpC;;;;AAAA,iBAYgB,IAAA,CAAK,KAAa;AARlC;;;AAAA,cAiBa,MAAA,EAAQ,UASpB;AA1BmC;AAQpC;;AARoC,cA+BvB,OAAA,EAAS,UASrB;;AAhCiC;AASlC;cA4Ba,OAAA,EAAS,UASrB"}
@@ -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/string/ip.ts
4
+ //#region ../../packages/seal/src/rules/string/ip.ts
5
5
  /**
6
6
  * Pure, dependency-free re-implementation of Node's `net.isIP`/`isIPv4`/`isIPv6`.
7
7
  * Mirrors the exact regex Node uses internally (lib/internal/net.js) so that
@@ -1 +1 @@
1
- {"version":3,"file":"ip.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/string/ip.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Pure, dependency-free re-implementation of Node's `net.isIP`/`isIPv4`/`isIPv6`.\n * Mirrors the exact regex Node uses internally (lib/internal/net.js) so that\n * behavior stays identical while remaining runnable in the browser (no `net` import).\n */\nconst v4Seg = \"(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\";\nconst v4Str = `(${v4Seg}[.]){3}${v4Seg}`;\nconst IPv4Reg = new RegExp(`^${v4Str}$`);\n\nconst v6Seg = \"(?:[0-9a-fA-F]{1,4})\";\nconst IPv6Reg = new RegExp(\n \"^(\" +\n `(?:${v6Seg}:){7}(?:${v6Seg}|:)|` +\n `(?:${v6Seg}:){6}(?:${v4Str}|:${v6Seg}|:)|` +\n `(?:${v6Seg}:){5}(?::${v4Str}|(:${v6Seg}){1,2}|:)|` +\n `(?:${v6Seg}:){4}(?:(:${v6Seg}){0,1}:${v4Str}|(:${v6Seg}){1,3}|:)|` +\n `(?:${v6Seg}:){3}(?:(:${v6Seg}){0,2}:${v4Str}|(:${v6Seg}){1,4}|:)|` +\n `(?:${v6Seg}:){2}(?:(:${v6Seg}){0,3}:${v4Str}|(:${v6Seg}){1,5}|:)|` +\n `(?:${v6Seg}:){1}(?:(:${v6Seg}){0,4}:${v4Str}|(:${v6Seg}){1,6}|:)|` +\n `(?::((?::${v6Seg}){0,5}:${v4Str}|(?::${v6Seg}){1,7}|:))` +\n \")(%[0-9a-zA-Z-.:]{1,})?$\",\n);\n\nexport function isIPv4(value: string): boolean {\n return IPv4Reg.test(value);\n}\n\nexport function isIPv6(value: string): boolean {\n return IPv6Reg.test(value);\n}\n\n/**\n * Returns 4 or 6 when `value` is a valid IPv4/IPv6 address, otherwise 0.\n * Signature mirrors Node's `net.isIP` for drop-in behavior parity.\n */\nexport function isIP(value: string): 0 | 4 | 6 {\n if (isIPv4(value)) return 4;\n if (isIPv6(value)) return 6;\n return 0;\n}\n\n/**\n * IP rule - validates IP address (v4 or v6)\n */\nexport const ipRule: SchemaRule = {\n name: \"ip\",\n defaultErrorMessage: \"The :input must be a valid IP address\",\n async validate(value: any, context) {\n if (isIP(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * IPv4 rule - validates IPv4 address\n */\nexport const ip4Rule: SchemaRule = {\n name: \"ip4\",\n defaultErrorMessage: \"The :input must be a valid IPv4 address\",\n async validate(value: any, context) {\n if (isIP(value) === 4) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * IPv6 rule - validates IPv6 address\n */\nexport const ip6Rule: SchemaRule = {\n name: \"ip6\",\n defaultErrorMessage: \"The :input must be a valid IPv6 address\",\n async validate(value: any, context) {\n if (isIP(value) === 6) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;;AAQA,MAAM,QAAQ;AACd,MAAM,QAAQ,IAAI,MAAM,SAAS;AACjC,MAAM,UAAU,IAAI,OAAO,IAAI,MAAM,EAAE;AAEvC,MAAM,QAAQ;AACd,MAAM,UAAU,IAAI,OAClB,QACQ,MAAM,UAAU,MAAM,SACtB,MAAM,UAAU,MAAM,IAAI,MAAM,SAChC,MAAM,WAAW,MAAM,KAAK,MAAM,eAClC,MAAM,YAAY,MAAM,SAAS,MAAM,KAAK,MAAM,eAClD,MAAM,YAAY,MAAM,SAAS,MAAM,KAAK,MAAM,eAClD,MAAM,YAAY,MAAM,SAAS,MAAM,KAAK,MAAM,eAClD,MAAM,YAAY,MAAM,SAAS,MAAM,KAAK,MAAM,qBAC5C,MAAM,SAAS,MAAM,OAAO,MAAM,oCAElD;AAEA,SAAgB,OAAO,OAAwB;CAC7C,OAAO,QAAQ,KAAK,KAAK;AAC3B;AAEA,SAAgB,OAAO,OAAwB;CAC7C,OAAO,QAAQ,KAAK,KAAK;AAC3B;;;;;AAMA,SAAgB,KAAK,OAA0B;CAC7C,IAAI,OAAO,KAAK,GAAG,OAAO;CAC1B,IAAI,OAAO,KAAK,GAAG,OAAO;CAC1B,OAAO;AACT;;;;AAKA,MAAa,SAAqB;CAChC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,KAAK,KAAK,GACZ,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,UAAsB;CACjC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,KAAK,KAAK,MAAM,GAClB,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,UAAsB;CACjC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,KAAK,KAAK,MAAM,GAClB,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"ip.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/ip.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Pure, dependency-free re-implementation of Node's `net.isIP`/`isIPv4`/`isIPv6`.\n * Mirrors the exact regex Node uses internally (lib/internal/net.js) so that\n * behavior stays identical while remaining runnable in the browser (no `net` import).\n */\nconst v4Seg = \"(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\";\nconst v4Str = `(${v4Seg}[.]){3}${v4Seg}`;\nconst IPv4Reg = new RegExp(`^${v4Str}$`);\n\nconst v6Seg = \"(?:[0-9a-fA-F]{1,4})\";\nconst IPv6Reg = new RegExp(\n \"^(\" +\n `(?:${v6Seg}:){7}(?:${v6Seg}|:)|` +\n `(?:${v6Seg}:){6}(?:${v4Str}|:${v6Seg}|:)|` +\n `(?:${v6Seg}:){5}(?::${v4Str}|(:${v6Seg}){1,2}|:)|` +\n `(?:${v6Seg}:){4}(?:(:${v6Seg}){0,1}:${v4Str}|(:${v6Seg}){1,3}|:)|` +\n `(?:${v6Seg}:){3}(?:(:${v6Seg}){0,2}:${v4Str}|(:${v6Seg}){1,4}|:)|` +\n `(?:${v6Seg}:){2}(?:(:${v6Seg}){0,3}:${v4Str}|(:${v6Seg}){1,5}|:)|` +\n `(?:${v6Seg}:){1}(?:(:${v6Seg}){0,4}:${v4Str}|(:${v6Seg}){1,6}|:)|` +\n `(?::((?::${v6Seg}){0,5}:${v4Str}|(?::${v6Seg}){1,7}|:))` +\n \")(%[0-9a-zA-Z-.:]{1,})?$\",\n);\n\nexport function isIPv4(value: string): boolean {\n return IPv4Reg.test(value);\n}\n\nexport function isIPv6(value: string): boolean {\n return IPv6Reg.test(value);\n}\n\n/**\n * Returns 4 or 6 when `value` is a valid IPv4/IPv6 address, otherwise 0.\n * Signature mirrors Node's `net.isIP` for drop-in behavior parity.\n */\nexport function isIP(value: string): 0 | 4 | 6 {\n if (isIPv4(value)) return 4;\n if (isIPv6(value)) return 6;\n return 0;\n}\n\n/**\n * IP rule - validates IP address (v4 or v6)\n */\nexport const ipRule: SchemaRule = {\n name: \"ip\",\n defaultErrorMessage: \"The :input must be a valid IP address\",\n async validate(value: any, context) {\n if (isIP(value)) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * IPv4 rule - validates IPv4 address\n */\nexport const ip4Rule: SchemaRule = {\n name: \"ip4\",\n defaultErrorMessage: \"The :input must be a valid IPv4 address\",\n async validate(value: any, context) {\n if (isIP(value) === 4) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n\n/**\n * IPv6 rule - validates IPv6 address\n */\nexport const ip6Rule: SchemaRule = {\n name: \"ip6\",\n defaultErrorMessage: \"The :input must be a valid IPv6 address\",\n async validate(value: any, context) {\n if (isIP(value) === 6) {\n return VALID_RULE;\n }\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;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5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/string/matches.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/string/matches.d.ts
3
4
  /**
4
5
  * Matches rule - value must match another field value
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"matches.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/string/matches.ts"],"mappings":";;;;;cAOa,WAAA,EAAa,UAAU;EAAG,KAAK;AAAA"}
1
+ {"version":3,"file":"matches.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/matches.ts"],"mappings":";;;;;AAOA;cAAa,WAAA,EAAa,UAAU;EAAG,KAAK;AAAA"}
@@ -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/string/matches.ts
5
+ //#region ../../packages/seal/src/rules/string/matches.ts
6
6
  /**
7
7
  * Matches rule - value must match another field value
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"matches.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/string/matches.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Matches rule - value must match another field value\n */\nexport const matchesRule: SchemaRule<{ field: string }> = {\n name: \"matches\",\n defaultErrorMessage: \"The :input must match :field\",\n async validate(value: any, context) {\n const otherFieldValue = get(context.allValues, this.context.options.field);\n\n if (value === otherFieldValue) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.field = this.context.options.field;\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;AAOA,MAAa,cAA6C;CACxD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAGlC,IAAI,UAFoB,IAAI,QAAQ,WAAW,KAAK,QAAQ,QAAQ,KAExC,GAC1B,OAAO;EAGT,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"matches.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/matches.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Matches rule - value must match another field value\n */\nexport const matchesRule: SchemaRule<{ field: string }> = {\n name: \"matches\",\n defaultErrorMessage: \"The :input must match :field\",\n async validate(value: any, context) {\n const otherFieldValue = get(context.allValues, this.context.options.field);\n\n if (value === otherFieldValue) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.field = this.context.options.field;\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;;AAOA,MAAa,cAA6C;CACxD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAGlC,IAAI,UAFoB,IAAI,QAAQ,WAAW,KAAK,QAAQ,QAAQ,KAExC,GAC1B,OAAO;EAGT,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/string/pattern.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/string/pattern.d.ts
3
4
  /**
4
5
  * Pattern rule - validates against regex pattern
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"pattern.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/string/pattern.ts"],"mappings":";;;;;cAMa,WAAA,EAAa,UAAU;EAAG,OAAA,EAAS,MAAA;AAAA"}
1
+ {"version":3,"file":"pattern.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/pattern.ts"],"mappings":";;;;;AAMA;cAAa,WAAA,EAAa,UAAU;EAAG,OAAA,EAAS,MAAA;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/string/pattern.ts
4
+ //#region ../../packages/seal/src/rules/string/pattern.ts
5
5
  /**
6
6
  * Pattern rule - validates against regex pattern
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"pattern.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/string/pattern.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Pattern rule - validates against regex pattern\n */\nexport const patternRule: SchemaRule<{ pattern: RegExp }> = {\n name: \"pattern\",\n defaultErrorMessage: \"The :input does not match the required pattern\",\n async validate(value: any, context) {\n if (this.context.options.pattern.test(value)) {\n return VALID_RULE;\n }\n\n this.context.translationParams.pattern = this.context.options.pattern.toString();\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,cAA+C;CAC1D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,KAAK,QAAQ,QAAQ,QAAQ,KAAK,KAAK,GACzC,OAAO;EAGT,KAAK,QAAQ,kBAAkB,UAAU,KAAK,QAAQ,QAAQ,QAAQ,SAAS;EAC/E,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"pattern.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/pattern.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Pattern rule - validates against regex pattern\n */\nexport const patternRule: SchemaRule<{ pattern: RegExp }> = {\n name: \"pattern\",\n defaultErrorMessage: \"The :input does not match the required pattern\",\n async validate(value: any, context) {\n if (this.context.options.pattern.test(value)) {\n return VALID_RULE;\n }\n\n this.context.translationParams.pattern = this.context.options.pattern.toString();\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,cAA+C;CAC1D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,KAAK,QAAQ,QAAQ,QAAQ,KAAK,KAAK,GACzC,OAAO;EAGT,KAAK,QAAQ,kBAAkB,UAAU,KAAK,QAAQ,QAAQ,QAAQ,SAAS;EAC/E,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/string/string-comparison.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/string/string-comparison.d.ts
3
4
  /**
4
5
  * Starts with rule
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"string-comparison.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/string/string-comparison.ts"],"mappings":";;;;;cAMa,cAAA,EAAgB,UAAU;EAAG,KAAK;AAAA;;AAAA;AAiB/C;cAAa,YAAA,EAAc,UAAU;EAAG,KAAK;AAAA;AAAA;AAiB7C;;AAjB6C,cAiBhC,YAAA,EAAc,UAAU;EAAG,KAAK;AAAA;AAiB7C;;;AAAA,cAAa,eAAA,EAAiB,UAAU;EAAG,KAAK;AAAA"}
1
+ {"version":3,"file":"string-comparison.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/string-comparison.ts"],"mappings":";;;;;AAMA;cAAa,cAAA,EAAgB,UAAU;EAAG,KAAK;AAAA;AAAA;AAiB/C;;AAjB+C,cAiBlC,YAAA,EAAc,UAAU;EAAG,KAAK;AAAA;AAiB7C;;;AAAA,cAAa,YAAA,EAAc,UAAU;EAAG,KAAK;AAAA;;;;cAiBhC,eAAA,EAAiB,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/string/string-comparison.ts
4
+ //#region ../../packages/seal/src/rules/string/string-comparison.ts
5
5
  /**
6
6
  * Starts with rule
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"string-comparison.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/string/string-comparison.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Starts with rule\n */\nexport const startsWithRule: SchemaRule<{ value: string }> = {\n name: \"startsWith\",\n defaultErrorMessage: \"The :input must start with :value\",\n async validate(value: any, context) {\n if (String(value).startsWith(this.context.options.value)) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.value = this.context.options.value;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Ends with rule\n */\nexport const endsWithRule: SchemaRule<{ value: string }> = {\n name: \"endsWith\",\n defaultErrorMessage: \"The :input must end with :value\",\n async validate(value: any, context) {\n if (String(value).endsWith(this.context.options.value)) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.value = this.context.options.value;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Contains rule\n */\nexport const containsRule: SchemaRule<{ value: string }> = {\n name: \"contains\",\n defaultErrorMessage: \"The :input must contain :value\",\n async validate(value: any, context) {\n if (String(value).includes(this.context.options.value)) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.value = this.context.options.value;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Not contains rule\n */\nexport const notContainsRule: SchemaRule<{ value: string }> = {\n name: \"notContains\",\n defaultErrorMessage: \"The :input must not contain :value\",\n async validate(value: any, context) {\n if (!String(value).includes(this.context.options.value)) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.value = this.context.options.value;\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,iBAAgD;CAC3D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,OAAO,KAAK,CAAC,CAAC,WAAW,KAAK,QAAQ,QAAQ,KAAK,GACrD,OAAO;EAGT,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,eAA8C;CACzD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,OAAO,KAAK,CAAC,CAAC,SAAS,KAAK,QAAQ,QAAQ,KAAK,GACnD,OAAO;EAGT,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,eAA8C;CACzD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,OAAO,KAAK,CAAC,CAAC,SAAS,KAAK,QAAQ,QAAQ,KAAK,GACnD,OAAO;EAGT,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,kBAAiD;CAC5D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,CAAC,OAAO,KAAK,CAAC,CAAC,SAAS,KAAK,QAAQ,QAAQ,KAAK,GACpD,OAAO;EAGT,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
1
+ {"version":3,"file":"string-comparison.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/string-comparison.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Starts with rule\n */\nexport const startsWithRule: SchemaRule<{ value: string }> = {\n name: \"startsWith\",\n defaultErrorMessage: \"The :input must start with :value\",\n async validate(value: any, context) {\n if (String(value).startsWith(this.context.options.value)) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.value = this.context.options.value;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Ends with rule\n */\nexport const endsWithRule: SchemaRule<{ value: string }> = {\n name: \"endsWith\",\n defaultErrorMessage: \"The :input must end with :value\",\n async validate(value: any, context) {\n if (String(value).endsWith(this.context.options.value)) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.value = this.context.options.value;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Contains rule\n */\nexport const containsRule: SchemaRule<{ value: string }> = {\n name: \"contains\",\n defaultErrorMessage: \"The :input must contain :value\",\n async validate(value: any, context) {\n if (String(value).includes(this.context.options.value)) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.value = this.context.options.value;\n\n return invalidRule(this, context);\n },\n};\n\n/**\n * Not contains rule\n */\nexport const notContainsRule: SchemaRule<{ value: string }> = {\n name: \"notContains\",\n defaultErrorMessage: \"The :input must not contain :value\",\n async validate(value: any, context) {\n if (!String(value).includes(this.context.options.value)) {\n return VALID_RULE;\n }\n\n this.context.translatableParams.value = this.context.options.value;\n\n return invalidRule(this, context);\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,iBAAgD;CAC3D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,OAAO,KAAK,CAAC,CAAC,WAAW,KAAK,QAAQ,QAAQ,KAAK,GACrD,OAAO;EAGT,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,eAA8C;CACzD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,OAAO,KAAK,CAAC,CAAC,SAAS,KAAK,QAAQ,QAAQ,KAAK,GACnD,OAAO;EAGT,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,eAA8C;CACzD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,OAAO,KAAK,CAAC,CAAC,SAAS,KAAK,QAAQ,QAAQ,KAAK,GACnD,OAAO;EAGT,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,kBAAiD;CAC5D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,CAAC,OAAO,KAAK,CAAC,CAAC,SAAS,KAAK,QAAQ,QAAQ,KAAK,GACpD,OAAO;EAGT,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;EAE7D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/string/strong-password-rule.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/string/strong-password-rule.d.ts
3
4
  /**
4
5
  * Strong Password rule - validates password strength
5
6
  * Requirements:
@@ -1 +1 @@
1
- {"version":3,"file":"strong-password-rule.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/string/strong-password-rule.ts"],"mappings":";;;;;AAYA;;;;AAAuD;;cAA1C,kBAAA,EAAoB,UAAU;EAAG,SAAS;AAAA"}
1
+ {"version":3,"file":"strong-password-rule.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/strong-password-rule.ts"],"mappings":";;;;;AAYA;;;;AAAuD;;;cAA1C,kBAAA,EAAoB,UAAU;EAAG,SAAS;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/string/strong-password-rule.ts
4
+ //#region ../../packages/seal/src/rules/string/strong-password-rule.ts
5
5
  /**
6
6
  * Strong Password rule - validates password strength
7
7
  * Requirements:
@@ -1 +1 @@
1
- {"version":3,"file":"strong-password-rule.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/string/strong-password-rule.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Strong Password rule - validates password strength\n * Requirements:\n * - At least 8 characters\n * - At least 1 uppercase letter\n * - At least 1 lowercase letter\n * - At least 1 number\n * - At least 1 special character\n */\nexport const strongPasswordRule: SchemaRule<{ minLength?: number }> = {\n name: \"strongPassword\",\n defaultErrorMessage:\n \"The :input must be at least 8 characters and contain at least one uppercase letter, one lowercase letter, one number, and one special character\",\n async validate(value: any, context) {\n const password = String(value);\n const minLength = this.context.options.minLength ?? 8;\n\n // Check minimum length\n if (password.length < minLength) {\n return invalidRule(this, context);\n }\n\n // Check for at least one uppercase letter\n if (!/[A-Z]/.test(password)) {\n return invalidRule(this, context);\n }\n\n // Check for at least one lowercase letter\n if (!/[a-z]/.test(password)) {\n return invalidRule(this, context);\n }\n\n // Check for at least one number\n if (!/[0-9]/.test(password)) {\n return invalidRule(this, context);\n }\n\n // Check for at least one special character\n if (!/[!@#$%^&*()_+\\-=[\\]{};':\"\\\\|,.<>/?]/.test(password)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;;;AAYA,MAAa,qBAAyD;CACpE,MAAM;CACN,qBACE;CACF,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,WAAW,OAAO,KAAK;EAC7B,MAAM,YAAY,KAAK,QAAQ,QAAQ,aAAa;EAGpD,IAAI,SAAS,SAAS,WACpB,OAAO,YAAY,MAAM,OAAO;EAIlC,IAAI,CAAC,QAAQ,KAAK,QAAQ,GACxB,OAAO,YAAY,MAAM,OAAO;EAIlC,IAAI,CAAC,QAAQ,KAAK,QAAQ,GACxB,OAAO,YAAY,MAAM,OAAO;EAIlC,IAAI,CAAC,QAAQ,KAAK,QAAQ,GACxB,OAAO,YAAY,MAAM,OAAO;EAIlC,IAAI,CAAC,sCAAsC,KAAK,QAAQ,GACtD,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"strong-password-rule.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/strong-password-rule.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * Strong Password rule - validates password strength\n * Requirements:\n * - At least 8 characters\n * - At least 1 uppercase letter\n * - At least 1 lowercase letter\n * - At least 1 number\n * - At least 1 special character\n */\nexport const strongPasswordRule: SchemaRule<{ minLength?: number }> = {\n name: \"strongPassword\",\n defaultErrorMessage:\n \"The :input must be at least 8 characters and contain at least one uppercase letter, one lowercase letter, one number, and one special character\",\n async validate(value: any, context) {\n const password = String(value);\n const minLength = this.context.options.minLength ?? 8;\n\n // Check minimum length\n if (password.length < minLength) {\n return invalidRule(this, context);\n }\n\n // Check for at least one uppercase letter\n if (!/[A-Z]/.test(password)) {\n return invalidRule(this, context);\n }\n\n // Check for at least one lowercase letter\n if (!/[a-z]/.test(password)) {\n return invalidRule(this, context);\n }\n\n // Check for at least one number\n if (!/[0-9]/.test(password)) {\n return invalidRule(this, context);\n }\n\n // Check for at least one special character\n if (!/[!@#$%^&*()_+\\-=[\\]{};':\"\\\\|,.<>/?]/.test(password)) {\n return invalidRule(this, context);\n }\n\n return VALID_RULE;\n },\n};\n"],"mappings":";;;;;;;;;;;;;AAYA,MAAa,qBAAyD;CACpE,MAAM;CACN,qBACE;CACF,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,WAAW,OAAO,KAAK;EAC7B,MAAM,YAAY,KAAK,QAAQ,QAAQ,aAAa;EAGpD,IAAI,SAAS,SAAS,WACpB,OAAO,YAAY,MAAM,OAAO;EAIlC,IAAI,CAAC,QAAQ,KAAK,QAAQ,GACxB,OAAO,YAAY,MAAM,OAAO;EAIlC,IAAI,CAAC,QAAQ,KAAK,QAAQ,GACxB,OAAO,YAAY,MAAM,OAAO;EAIlC,IAAI,CAAC,QAAQ,KAAK,QAAQ,GACxB,OAAO,YAAY,MAAM,OAAO;EAIlC,IAAI,CAAC,sCAAsC,KAAK,QAAQ,GACtD,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/string/url.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/string/url.d.ts
3
4
  /**
4
5
  * URL rule - validates URL format
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"url.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/string/url.ts"],"mappings":";;;;;cAMa,OAAA,EAAS,UAWrB"}
1
+ {"version":3,"file":"url.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/url.ts"],"mappings":";;;;;AAMA;cAAa,OAAA,EAAS,UAWrB"}
@@ -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/string/url.ts
4
+ //#region ../../packages/seal/src/rules/string/url.ts
5
5
  /**
6
6
  * URL rule - validates URL format
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"url.mjs","names":[],"sources":["../../../../../../../../seal/src/rules/string/url.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * URL rule - validates URL format\n */\nexport const urlRule: SchemaRule = {\n name: \"url\",\n defaultErrorMessage: \"The :input must be a valid URL\",\n async validate(value: any, context) {\n try {\n new URL(value);\n return VALID_RULE;\n } catch {\n return invalidRule(this, context);\n }\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,UAAsB;CACjC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI;GACF,IAAI,IAAI,KAAK;GACb,OAAO;EACT,QAAQ;GACN,OAAO,YAAY,MAAM,OAAO;EAClC;CACF;AACF"}
1
+ {"version":3,"file":"url.mjs","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/url.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\nimport type { SchemaRule } from \"../../types\";\n\n/**\n * URL rule - validates URL format\n */\nexport const urlRule: SchemaRule = {\n name: \"url\",\n defaultErrorMessage: \"The :input must be a valid URL\",\n async validate(value: any, context) {\n try {\n new URL(value);\n return VALID_RULE;\n } catch {\n return invalidRule(this, context);\n }\n },\n};\n"],"mappings":";;;;;;;AAMA,MAAa,UAAsB;CACjC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI;GACF,IAAI,IAAI,KAAK;GACb,OAAO;EACT,QAAQ;GACN,OAAO,YAAY,MAAM,OAAO;EAClC;CACF;AACF"}
@@ -1,5 +1,6 @@
1
1
  import { SchemaRule } from "../../types/rule-types.mjs";
2
- //#region ../seal/src/rules/string/without-whitespace.d.ts
2
+
3
+ //#region ../../packages/seal/src/rules/string/without-whitespace.d.ts
3
4
  /**
4
5
  * Without whitespace rule - value must not contain whitespace
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"without-whitespace.d.mts","names":[],"sources":["../../../../../../../../seal/src/rules/string/without-whitespace.ts"],"mappings":";;;;;cAMa,qBAAA,EAAuB,UASnC"}
1
+ {"version":3,"file":"without-whitespace.d.mts","names":[],"sources":["../../../../../../../../../packages/seal/src/rules/string/without-whitespace.ts"],"mappings":";;;;;AAMA;cAAa,qBAAA,EAAuB,UASnC"}
@@ -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/string/without-whitespace.ts
4
+ //#region ../../packages/seal/src/rules/string/without-whitespace.ts
5
5
  /**
6
6
  * Without whitespace rule - value must not contain whitespace
7
7
  */