@warlock.js/seal 4.0.171 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.cjs +8900 -0
- package/cjs/index.cjs.map +1 -0
- package/esm/config.d.mts +47 -0
- package/esm/config.d.mts.map +1 -0
- package/esm/config.mjs +40 -0
- package/esm/config.mjs.map +1 -0
- package/esm/factory/index.d.mts +2 -0
- package/esm/factory/index.mjs +4 -0
- package/esm/factory/validate.d.mts +16 -0
- package/esm/factory/validate.d.mts.map +1 -0
- package/esm/factory/validate.mjs +29 -0
- package/esm/factory/validate.mjs.map +1 -0
- package/esm/factory/validators.d.mts +75 -0
- package/esm/factory/validators.d.mts.map +1 -0
- package/esm/factory/validators.mjs +132 -0
- package/esm/factory/validators.mjs.map +1 -0
- package/esm/helpers/date-helpers.d.mts +19 -0
- package/esm/helpers/date-helpers.d.mts.map +1 -0
- package/esm/helpers/date-helpers.mjs +24 -0
- package/esm/helpers/date-helpers.mjs.map +1 -0
- package/esm/helpers/file.utils.d.mts +12 -0
- package/esm/helpers/file.utils.d.mts.map +1 -0
- package/esm/helpers/file.utils.mjs +33 -0
- package/esm/helpers/file.utils.mjs.map +1 -0
- package/esm/helpers/get-field-value.d.mts +42 -0
- package/esm/helpers/get-field-value.d.mts.map +1 -0
- package/esm/helpers/get-field-value.mjs +45 -0
- package/esm/helpers/get-field-value.mjs.map +1 -0
- package/esm/helpers/index.mjs +7 -0
- package/esm/helpers/is-empty-value.mjs +10 -0
- package/esm/helpers/is-empty-value.mjs.map +1 -0
- package/esm/helpers/path-helpers.d.mts +8 -0
- package/esm/helpers/path-helpers.d.mts.map +1 -0
- package/esm/helpers/path-helpers.mjs +12 -0
- package/esm/helpers/path-helpers.mjs.map +1 -0
- package/esm/helpers/validation-helpers.d.mts +36 -0
- package/esm/helpers/validation-helpers.d.mts.map +1 -0
- package/esm/helpers/validation-helpers.mjs +72 -0
- package/esm/helpers/validation-helpers.mjs.map +1 -0
- package/esm/index.d.mts +96 -0
- package/esm/index.mjs +92 -0
- package/esm/mutators/array-mutators.d.mts +16 -0
- package/esm/mutators/array-mutators.d.mts.map +1 -0
- package/esm/mutators/array-mutators.mjs +40 -0
- package/esm/mutators/array-mutators.mjs.map +1 -0
- package/esm/mutators/date-mutators.d.mts +43 -0
- package/esm/mutators/date-mutators.d.mts.map +1 -0
- package/esm/mutators/date-mutators.mjs +113 -0
- package/esm/mutators/date-mutators.mjs.map +1 -0
- package/esm/mutators/index.mjs +8 -0
- package/esm/mutators/number-mutators.d.mts +26 -0
- package/esm/mutators/number-mutators.d.mts.map +1 -0
- package/esm/mutators/number-mutators.mjs +53 -0
- package/esm/mutators/number-mutators.mjs.map +1 -0
- package/esm/mutators/object-mutators.d.mts +12 -0
- package/esm/mutators/object-mutators.d.mts.map +1 -0
- package/esm/mutators/object-mutators.mjs +37 -0
- package/esm/mutators/object-mutators.mjs.map +1 -0
- package/esm/mutators/scalar-mutators.d.mts +7 -0
- package/esm/mutators/scalar-mutators.d.mts.map +1 -0
- package/esm/mutators/scalar-mutators.mjs +9 -0
- package/esm/mutators/scalar-mutators.mjs.map +1 -0
- package/esm/mutators/string-mutators.d.mts +76 -0
- package/esm/mutators/string-mutators.d.mts.map +1 -0
- package/esm/mutators/string-mutators.mjs +169 -0
- package/esm/mutators/string-mutators.mjs.map +1 -0
- package/esm/plugins/plugin-system.d.mts +71 -0
- package/esm/plugins/plugin-system.d.mts.map +1 -0
- package/esm/plugins/plugin-system.mjs +64 -0
- package/esm/plugins/plugin-system.mjs.map +1 -0
- package/esm/rules/array/array-rules.d.mts +16 -0
- package/esm/rules/array/array-rules.d.mts.map +1 -0
- package/esm/rules/array/array-rules.mjs +41 -0
- package/esm/rules/array/array-rules.mjs.map +1 -0
- package/esm/rules/array/index.mjs +3 -0
- package/esm/rules/color/color-rules.d.mts +34 -0
- package/esm/rules/color/color-rules.d.mts.map +1 -0
- package/esm/rules/color/color-rules.mjs +104 -0
- package/esm/rules/color/color-rules.mjs.map +1 -0
- package/esm/rules/color/index.mjs +3 -0
- package/esm/rules/common/enum.d.mts +30 -0
- package/esm/rules/common/enum.d.mts.map +1 -0
- package/esm/rules/common/enum.mjs +77 -0
- package/esm/rules/common/enum.mjs.map +1 -0
- package/esm/rules/common/equals-field-rules.d.mts +22 -0
- package/esm/rules/common/equals-field-rules.d.mts.map +1 -0
- package/esm/rules/common/equals-field-rules.mjs +42 -0
- package/esm/rules/common/equals-field-rules.mjs.map +1 -0
- package/esm/rules/common/index.mjs +8 -0
- package/esm/rules/common/instanceof.d.mts +16 -0
- package/esm/rules/common/instanceof.d.mts.map +1 -0
- package/esm/rules/common/instanceof.mjs +23 -0
- package/esm/rules/common/instanceof.mjs.map +1 -0
- package/esm/rules/common/literal.d.mts +16 -0
- package/esm/rules/common/literal.d.mts.map +1 -0
- package/esm/rules/common/literal.mjs +29 -0
- package/esm/rules/common/literal.mjs.map +1 -0
- package/esm/rules/common/type-rules.d.mts +42 -0
- package/esm/rules/common/type-rules.d.mts.map +1 -0
- package/esm/rules/common/type-rules.mjs +112 -0
- package/esm/rules/common/type-rules.mjs.map +1 -0
- package/esm/rules/common/unknown-key.d.mts +14 -0
- package/esm/rules/common/unknown-key.d.mts.map +1 -0
- package/esm/rules/common/unknown-key.mjs +25 -0
- package/esm/rules/common/unknown-key.mjs.map +1 -0
- package/esm/rules/conditional/forbidden-if-rules.d.mts +58 -0
- package/esm/rules/conditional/forbidden-if-rules.d.mts.map +1 -0
- package/esm/rules/conditional/forbidden-if-rules.mjs +116 -0
- package/esm/rules/conditional/forbidden-if-rules.mjs.map +1 -0
- package/esm/rules/conditional/index.mjs +12 -0
- package/esm/rules/conditional/present-if-rules.d.mts +49 -0
- package/esm/rules/conditional/present-if-rules.d.mts.map +1 -0
- package/esm/rules/conditional/present-if-rules.mjs +97 -0
- package/esm/rules/conditional/present-if-rules.mjs.map +1 -0
- package/esm/rules/conditional/present-unless-rules.d.mts +15 -0
- package/esm/rules/conditional/present-unless-rules.d.mts.map +1 -0
- package/esm/rules/conditional/present-unless-rules.mjs +30 -0
- package/esm/rules/conditional/present-unless-rules.mjs.map +1 -0
- package/esm/rules/conditional/present-with-rules.d.mts +30 -0
- package/esm/rules/conditional/present-with-rules.d.mts.map +1 -0
- package/esm/rules/conditional/present-with-rules.mjs +75 -0
- package/esm/rules/conditional/present-with-rules.mjs.map +1 -0
- package/esm/rules/conditional/present-without-rules.d.mts +30 -0
- package/esm/rules/conditional/present-without-rules.d.mts.map +1 -0
- package/esm/rules/conditional/present-without-rules.mjs +75 -0
- package/esm/rules/conditional/present-without-rules.mjs.map +1 -0
- package/esm/rules/conditional/required-if-rules.d.mts +81 -0
- package/esm/rules/conditional/required-if-rules.d.mts.map +1 -0
- package/esm/rules/conditional/required-if-rules.mjs +203 -0
- package/esm/rules/conditional/required-if-rules.mjs.map +1 -0
- package/esm/rules/conditional/required-unless-rules.d.mts +15 -0
- package/esm/rules/conditional/required-unless-rules.d.mts.map +1 -0
- package/esm/rules/conditional/required-unless-rules.mjs +31 -0
- package/esm/rules/conditional/required-unless-rules.mjs.map +1 -0
- package/esm/rules/conditional/required-when-rule.d.mts +23 -0
- package/esm/rules/conditional/required-when-rule.d.mts.map +1 -0
- package/esm/rules/conditional/required-when-rule.mjs +32 -0
- package/esm/rules/conditional/required-when-rule.mjs.map +1 -0
- package/esm/rules/conditional/required-with-rules.d.mts +30 -0
- package/esm/rules/conditional/required-with-rules.d.mts.map +1 -0
- package/esm/rules/conditional/required-with-rules.mjs +66 -0
- package/esm/rules/conditional/required-with-rules.mjs.map +1 -0
- package/esm/rules/conditional/required-without-rules.d.mts +30 -0
- package/esm/rules/conditional/required-without-rules.d.mts.map +1 -0
- package/esm/rules/conditional/required-without-rules.mjs +66 -0
- package/esm/rules/conditional/required-without-rules.mjs.map +1 -0
- package/esm/rules/core/equal.d.mts +12 -0
- package/esm/rules/core/equal.d.mts.map +1 -0
- package/esm/rules/core/equal.mjs +22 -0
- package/esm/rules/core/equal.mjs.map +1 -0
- package/esm/rules/core/forbidden.d.mts +10 -0
- package/esm/rules/core/forbidden.d.mts.map +1 -0
- package/esm/rules/core/forbidden.mjs +20 -0
- package/esm/rules/core/forbidden.mjs.map +1 -0
- package/esm/rules/core/index.mjs +7 -0
- package/esm/rules/core/required.d.mts +15 -0
- package/esm/rules/core/required.d.mts.map +1 -0
- package/esm/rules/core/required.mjs +36 -0
- package/esm/rules/core/required.mjs.map +1 -0
- package/esm/rules/core/union.d.mts +13 -0
- package/esm/rules/core/union.d.mts.map +1 -0
- package/esm/rules/core/union.mjs +30 -0
- package/esm/rules/core/union.mjs.map +1 -0
- package/esm/rules/core/when.d.mts +11 -0
- package/esm/rules/core/when.d.mts.map +1 -0
- package/esm/rules/core/when.mjs +36 -0
- package/esm/rules/core/when.mjs.map +1 -0
- package/esm/rules/date/date-comparison-rules.d.mts +29 -0
- package/esm/rules/date/date-comparison-rules.d.mts.map +1 -0
- package/esm/rules/date/date-comparison-rules.mjs +78 -0
- package/esm/rules/date/date-comparison-rules.mjs.map +1 -0
- package/esm/rules/date/date-day-rules.d.mts +25 -0
- package/esm/rules/date/date-day-rules.d.mts.map +1 -0
- package/esm/rules/date/date-day-rules.mjs +61 -0
- package/esm/rules/date/date-day-rules.mjs.map +1 -0
- package/esm/rules/date/date-field-comparison-rules.d.mts +32 -0
- package/esm/rules/date/date-field-comparison-rules.d.mts.map +1 -0
- package/esm/rules/date/date-field-comparison-rules.mjs +81 -0
- package/esm/rules/date/date-field-comparison-rules.mjs.map +1 -0
- package/esm/rules/date/date-period-rules.d.mts +127 -0
- package/esm/rules/date/date-period-rules.d.mts.map +1 -0
- package/esm/rules/date/date-period-rules.mjs +398 -0
- package/esm/rules/date/date-period-rules.mjs.map +1 -0
- package/esm/rules/date/date-relative-rules.d.mts +24 -0
- package/esm/rules/date/date-relative-rules.d.mts.map +1 -0
- package/esm/rules/date/date-relative-rules.mjs +55 -0
- package/esm/rules/date/date-relative-rules.mjs.map +1 -0
- package/esm/rules/date/date-special-rules.d.mts +24 -0
- package/esm/rules/date/date-special-rules.d.mts.map +1 -0
- package/esm/rules/date/date-special-rules.mjs +58 -0
- package/esm/rules/date/date-special-rules.mjs.map +1 -0
- package/esm/rules/date/date.d.mts +97 -0
- package/esm/rules/date/date.d.mts.map +1 -0
- package/esm/rules/date/date.mjs +234 -0
- package/esm/rules/date/date.mjs.map +1 -0
- package/esm/rules/date/index.mjs +9 -0
- package/esm/rules/file/dimensions.d.mts +30 -0
- package/esm/rules/file/dimensions.d.mts.map +1 -0
- package/esm/rules/file/dimensions.mjs +56 -0
- package/esm/rules/file/dimensions.mjs.map +1 -0
- package/esm/rules/file/file-size.d.mts +18 -0
- package/esm/rules/file/file-size.d.mts.map +1 -0
- package/esm/rules/file/file-size.mjs +33 -0
- package/esm/rules/file/file-size.mjs.map +1 -0
- package/esm/rules/file/index.mjs +4 -0
- package/esm/rules/index.mjs +57 -0
- package/esm/rules/length/index.mjs +3 -0
- package/esm/rules/length/length-rules.d.mts +53 -0
- package/esm/rules/length/length-rules.d.mts.map +1 -0
- package/esm/rules/length/length-rules.mjs +98 -0
- package/esm/rules/length/length-rules.mjs.map +1 -0
- package/esm/rules/number/index.mjs +3 -0
- package/esm/rules/number/number-rules.d.mts +69 -0
- package/esm/rules/number/number-rules.d.mts.map +1 -0
- package/esm/rules/number/number-rules.mjs +196 -0
- package/esm/rules/number/number-rules.mjs.map +1 -0
- package/esm/rules/scalar/accepted-rule.mjs +116 -0
- package/esm/rules/scalar/accepted-rule.mjs.map +1 -0
- package/esm/rules/scalar/declined-rule.mjs +116 -0
- package/esm/rules/scalar/declined-rule.mjs.map +1 -0
- package/esm/rules/scalar/index.mjs +4 -0
- package/esm/rules/string/alpha.d.mts +18 -0
- package/esm/rules/string/alpha.d.mts.map +1 -0
- package/esm/rules/string/alpha.mjs +41 -0
- package/esm/rules/string/alpha.mjs.map +1 -0
- package/esm/rules/string/credit-card.d.mts +10 -0
- package/esm/rules/string/credit-card.d.mts.map +1 -0
- package/esm/rules/string/credit-card.mjs +32 -0
- package/esm/rules/string/credit-card.mjs.map +1 -0
- package/esm/rules/string/email.d.mts +10 -0
- package/esm/rules/string/email.d.mts.map +1 -0
- package/esm/rules/string/email.mjs +20 -0
- package/esm/rules/string/email.mjs.map +1 -0
- package/esm/rules/string/id-formats.d.mts +54 -0
- package/esm/rules/string/id-formats.d.mts.map +1 -0
- package/esm/rules/string/id-formats.mjs +104 -0
- package/esm/rules/string/id-formats.mjs.map +1 -0
- package/esm/rules/string/index.mjs +13 -0
- package/esm/rules/string/ip.d.mts +18 -0
- package/esm/rules/string/ip.d.mts.map +1 -0
- package/esm/rules/string/ip.mjs +42 -0
- package/esm/rules/string/ip.mjs.map +1 -0
- package/esm/rules/string/matches.d.mts +12 -0
- package/esm/rules/string/matches.d.mts.map +1 -0
- package/esm/rules/string/matches.mjs +21 -0
- package/esm/rules/string/matches.mjs.map +1 -0
- package/esm/rules/string/pattern.d.mts +12 -0
- package/esm/rules/string/pattern.d.mts.map +1 -0
- package/esm/rules/string/pattern.mjs +20 -0
- package/esm/rules/string/pattern.mjs.map +1 -0
- package/esm/rules/string/string-comparison.d.mts +30 -0
- package/esm/rules/string/string-comparison.d.mts.map +1 -0
- package/esm/rules/string/string-comparison.mjs +56 -0
- package/esm/rules/string/string-comparison.mjs.map +1 -0
- package/esm/rules/string/strong-password-rule.d.mts +18 -0
- package/esm/rules/string/strong-password-rule.d.mts.map +1 -0
- package/esm/rules/string/strong-password-rule.mjs +31 -0
- package/esm/rules/string/strong-password-rule.mjs.map +1 -0
- package/esm/rules/string/url.d.mts +10 -0
- package/esm/rules/string/url.d.mts.map +1 -0
- package/esm/rules/string/url.mjs +23 -0
- package/esm/rules/string/url.mjs.map +1 -0
- package/esm/rules/string/without-whitespace.d.mts +10 -0
- package/esm/rules/string/without-whitespace.d.mts.map +1 -0
- package/esm/rules/string/without-whitespace.mjs +19 -0
- package/esm/rules/string/without-whitespace.mjs.map +1 -0
- package/esm/standard-schema/json-schema.d.mts +65 -0
- package/esm/standard-schema/json-schema.d.mts.map +1 -0
- package/esm/standard-schema/json-schema.mjs +81 -0
- package/esm/standard-schema/json-schema.mjs.map +1 -0
- package/esm/standard-schema/map-result.d.mts +22 -0
- package/esm/standard-schema/map-result.d.mts.map +1 -0
- package/esm/standard-schema/map-result.mjs +26 -0
- package/esm/standard-schema/map-result.mjs.map +1 -0
- package/esm/standard-schema/types.d.mts +96 -0
- package/esm/standard-schema/types.d.mts.map +1 -0
- package/esm/types/conditional-types.d.mts +15 -0
- package/esm/types/conditional-types.d.mts.map +1 -0
- package/esm/types/context-types.d.mts +41 -0
- package/esm/types/context-types.d.mts.map +1 -0
- package/esm/types/data-transformer-types.d.mts +29 -0
- package/esm/types/data-transformer-types.d.mts.map +1 -0
- package/esm/types/date-types.d.mts +12 -0
- package/esm/types/date-types.d.mts.map +1 -0
- package/esm/types/date-types.mjs +17 -0
- package/esm/types/date-types.mjs.map +1 -0
- package/esm/types/file.types.d.mts +8 -0
- package/esm/types/file.types.d.mts.map +1 -0
- package/esm/types/inference-types.d.mts +178 -0
- package/esm/types/inference-types.d.mts.map +1 -0
- package/esm/types/mutator-types.d.mts +27 -0
- package/esm/types/mutator-types.d.mts.map +1 -0
- package/esm/types/result-types.d.mts +16 -0
- package/esm/types/result-types.d.mts.map +1 -0
- package/esm/types/rule-types.d.mts +52 -0
- package/esm/types/rule-types.d.mts.map +1 -0
- package/esm/types/schema-types.d.mts +10 -0
- package/esm/types/schema-types.d.mts.map +1 -0
- package/esm/validators/any-validator.d.mts +33 -0
- package/esm/validators/any-validator.d.mts.map +1 -0
- package/esm/validators/any-validator.mjs +35 -0
- package/esm/validators/any-validator.mjs.map +1 -0
- package/esm/validators/array-validator.d.mts +82 -0
- package/esm/validators/array-validator.d.mts.map +1 -0
- package/esm/validators/array-validator.mjs +176 -0
- package/esm/validators/array-validator.mjs.map +1 -0
- package/esm/validators/base-validator.d.mts +491 -0
- package/esm/validators/base-validator.d.mts.map +1 -0
- package/esm/validators/base-validator.mjs +656 -0
- package/esm/validators/base-validator.mjs.map +1 -0
- package/esm/validators/boolean-validator.d.mts +71 -0
- package/esm/validators/boolean-validator.d.mts.map +1 -0
- package/esm/validators/boolean-validator.mjs +126 -0
- package/esm/validators/boolean-validator.mjs.map +1 -0
- package/esm/validators/computed-validator.d.mts +80 -0
- package/esm/validators/computed-validator.d.mts.map +1 -0
- package/esm/validators/computed-validator.mjs +116 -0
- package/esm/validators/computed-validator.mjs.map +1 -0
- package/esm/validators/date-validator.d.mts +336 -0
- package/esm/validators/date-validator.d.mts.map +1 -0
- package/esm/validators/date-validator.mjs +637 -0
- package/esm/validators/date-validator.mjs.map +1 -0
- package/esm/validators/discriminated-union-validator.d.mts +67 -0
- package/esm/validators/discriminated-union-validator.d.mts.map +1 -0
- package/esm/validators/discriminated-union-validator.mjs +125 -0
- package/esm/validators/discriminated-union-validator.mjs.map +1 -0
- package/esm/validators/float-validator.d.mts +12 -0
- package/esm/validators/float-validator.d.mts.map +1 -0
- package/esm/validators/float-validator.mjs +18 -0
- package/esm/validators/float-validator.mjs.map +1 -0
- package/esm/validators/index.d.mts +22 -0
- package/esm/validators/index.mjs +28 -0
- package/esm/validators/instanceof-validator.d.mts +48 -0
- package/esm/validators/instanceof-validator.d.mts.map +1 -0
- package/esm/validators/instanceof-validator.mjs +63 -0
- package/esm/validators/instanceof-validator.mjs.map +1 -0
- package/esm/validators/int-validator.d.mts +23 -0
- package/esm/validators/int-validator.d.mts.map +1 -0
- package/esm/validators/int-validator.mjs +30 -0
- package/esm/validators/int-validator.mjs.map +1 -0
- package/esm/validators/lazy-validator.d.mts +70 -0
- package/esm/validators/lazy-validator.d.mts.map +1 -0
- package/esm/validators/lazy-validator.mjs +85 -0
- package/esm/validators/lazy-validator.mjs.map +1 -0
- package/esm/validators/literal-validator.d.mts +52 -0
- package/esm/validators/literal-validator.d.mts.map +1 -0
- package/esm/validators/literal-validator.mjs +67 -0
- package/esm/validators/literal-validator.mjs.map +1 -0
- package/esm/validators/managed-validator.d.mts +42 -0
- package/esm/validators/managed-validator.d.mts.map +1 -0
- package/esm/validators/managed-validator.mjs +39 -0
- package/esm/validators/managed-validator.mjs.map +1 -0
- package/esm/validators/methods/equality-conditional-methods.d.mts +90 -0
- package/esm/validators/methods/equality-conditional-methods.d.mts.map +1 -0
- package/esm/validators/methods/equality-conditional-methods.mjs +129 -0
- package/esm/validators/methods/equality-conditional-methods.mjs.map +1 -0
- package/esm/validators/methods/forbidden-methods.d.mts +58 -0
- package/esm/validators/methods/forbidden-methods.d.mts.map +1 -0
- package/esm/validators/methods/forbidden-methods.mjs +131 -0
- package/esm/validators/methods/forbidden-methods.mjs.map +1 -0
- package/esm/validators/methods/present-methods.d.mts +102 -0
- package/esm/validators/methods/present-methods.d.mts.map +1 -0
- package/esm/validators/methods/present-methods.mjs +235 -0
- package/esm/validators/methods/present-methods.mjs.map +1 -0
- package/esm/validators/methods/required-methods.d.mts +193 -0
- package/esm/validators/methods/required-methods.d.mts.map +1 -0
- package/esm/validators/methods/required-methods.mjs +347 -0
- package/esm/validators/methods/required-methods.mjs.map +1 -0
- package/esm/validators/number-validator.d.mts +170 -0
- package/esm/validators/number-validator.d.mts.map +1 -0
- package/esm/validators/number-validator.mjs +303 -0
- package/esm/validators/number-validator.mjs.map +1 -0
- package/esm/validators/numeric-validator.d.mts +19 -0
- package/esm/validators/numeric-validator.d.mts.map +1 -0
- package/esm/validators/numeric-validator.mjs +27 -0
- package/esm/validators/numeric-validator.mjs.map +1 -0
- package/esm/validators/object-validator.d.mts +253 -0
- package/esm/validators/object-validator.d.mts.map +1 -0
- package/esm/validators/object-validator.mjs +440 -0
- package/esm/validators/object-validator.mjs.map +1 -0
- package/esm/validators/primitive-validator.d.mts +74 -0
- package/esm/validators/primitive-validator.d.mts.map +1 -0
- package/esm/validators/primitive-validator.mjs +89 -0
- package/esm/validators/primitive-validator.mjs.map +1 -0
- package/esm/validators/record-validator.d.mts +63 -0
- package/esm/validators/record-validator.d.mts.map +1 -0
- package/esm/validators/record-validator.mjs +111 -0
- package/esm/validators/record-validator.mjs.map +1 -0
- package/esm/validators/scalar-validator.d.mts +97 -0
- package/esm/validators/scalar-validator.d.mts.map +1 -0
- package/esm/validators/scalar-validator.mjs +172 -0
- package/esm/validators/scalar-validator.mjs.map +1 -0
- package/esm/validators/string-validator.d.mts +224 -0
- package/esm/validators/string-validator.d.mts.map +1 -0
- package/esm/validators/string-validator.mjs +443 -0
- package/esm/validators/string-validator.mjs.map +1 -0
- package/esm/validators/tuple-validator.d.mts +66 -0
- package/esm/validators/tuple-validator.d.mts.map +1 -0
- package/esm/validators/tuple-validator.mjs +133 -0
- package/esm/validators/tuple-validator.mjs.map +1 -0
- package/esm/validators/union-validator.d.mts +59 -0
- package/esm/validators/union-validator.d.mts.map +1 -0
- package/esm/validators/union-validator.mjs +66 -0
- package/esm/validators/union-validator.mjs.map +1 -0
- package/llms-full.txt +2175 -0
- package/llms.txt +17 -0
- package/package.json +37 -48
- package/skills/bridge-standard-schema/SKILL.md +138 -0
- package/skills/compose-seal-modifiers/SKILL.md +271 -0
- package/skills/define-structural-shape/SKILL.md +138 -0
- package/skills/define-structural-shape/array-methods.md +78 -0
- package/skills/define-structural-shape/object-methods.md +166 -0
- package/skills/extend-seal-with-plugins/SKILL.md +178 -0
- package/skills/generate-json-schema/SKILL.md +143 -0
- package/skills/handle-seal-errors/SKILL.md +148 -0
- package/skills/overview/SKILL.md +72 -0
- package/skills/pick-seal-primitive/SKILL.md +133 -0
- package/skills/pick-seal-primitive/boolean-methods.md +71 -0
- package/skills/pick-seal-primitive/date-methods.md +175 -0
- package/skills/pick-seal-primitive/number-methods.md +123 -0
- package/skills/pick-seal-primitive/string-methods.md +169 -0
- package/skills/seal-basics/SKILL.md +106 -0
- package/cjs/config.d.ts +0 -48
- package/cjs/config.d.ts.map +0 -1
- package/cjs/config.js +0 -42
- package/cjs/config.js.map +0 -1
- package/cjs/factory/index.d.ts +0 -3
- package/cjs/factory/index.d.ts.map +0 -1
- package/cjs/factory/validate.d.ts +0 -8
- package/cjs/factory/validate.d.ts.map +0 -1
- package/cjs/factory/validate.js +0 -23
- package/cjs/factory/validate.js.map +0 -1
- package/cjs/factory/validators.d.ts +0 -56
- package/cjs/factory/validators.d.ts.map +0 -1
- package/cjs/factory/validators.js +0 -47
- package/cjs/factory/validators.js.map +0 -1
- package/cjs/helpers/date-helpers.d.ts +0 -16
- package/cjs/helpers/date-helpers.d.ts.map +0 -1
- package/cjs/helpers/date-helpers.js +0 -20
- package/cjs/helpers/date-helpers.js.map +0 -1
- package/cjs/helpers/file.utils.d.ts +0 -8
- package/cjs/helpers/file.utils.d.ts.map +0 -1
- package/cjs/helpers/file.utils.js +0 -29
- package/cjs/helpers/file.utils.js.map +0 -1
- package/cjs/helpers/get-field-value.d.ts +0 -37
- package/cjs/helpers/get-field-value.d.ts.map +0 -1
- package/cjs/helpers/get-field-value.js +0 -40
- package/cjs/helpers/get-field-value.js.map +0 -1
- package/cjs/helpers/index.d.ts +0 -6
- package/cjs/helpers/index.d.ts.map +0 -1
- package/cjs/helpers/is-empty-value.d.ts +0 -2
- package/cjs/helpers/is-empty-value.d.ts.map +0 -1
- package/cjs/helpers/is-empty-value.js +0 -3
- package/cjs/helpers/is-empty-value.js.map +0 -1
- package/cjs/helpers/path-helpers.d.ts +0 -5
- package/cjs/helpers/path-helpers.d.ts.map +0 -1
- package/cjs/helpers/path-helpers.js +0 -8
- package/cjs/helpers/path-helpers.js.map +0 -1
- package/cjs/helpers/validation-helpers.d.ts +0 -26
- package/cjs/helpers/validation-helpers.d.ts.map +0 -1
- package/cjs/helpers/validation-helpers.js +0 -74
- package/cjs/helpers/validation-helpers.js.map +0 -1
- package/cjs/index.d.ts +0 -30
- package/cjs/index.d.ts.map +0 -1
- package/cjs/index.js +0 -1
- package/cjs/index.js.map +0 -1
- package/cjs/mutators/array-mutators.d.ts +0 -12
- package/cjs/mutators/array-mutators.d.ts.map +0 -1
- package/cjs/mutators/array-mutators.js +0 -37
- package/cjs/mutators/array-mutators.js.map +0 -1
- package/cjs/mutators/date-mutators.d.ts +0 -39
- package/cjs/mutators/date-mutators.d.ts.map +0 -1
- package/cjs/mutators/date-mutators.js +0 -120
- package/cjs/mutators/date-mutators.js.map +0 -1
- package/cjs/mutators/index.d.ts +0 -7
- package/cjs/mutators/index.d.ts.map +0 -1
- package/cjs/mutators/number-mutators.d.ts +0 -22
- package/cjs/mutators/number-mutators.d.ts.map +0 -1
- package/cjs/mutators/number-mutators.js +0 -53
- package/cjs/mutators/number-mutators.js.map +0 -1
- package/cjs/mutators/object-mutators.d.ts +0 -8
- package/cjs/mutators/object-mutators.d.ts.map +0 -1
- package/cjs/mutators/object-mutators.js +0 -48
- package/cjs/mutators/object-mutators.js.map +0 -1
- package/cjs/mutators/scalar-mutators.d.ts +0 -3
- package/cjs/mutators/scalar-mutators.d.ts.map +0 -1
- package/cjs/mutators/scalar-mutators.js +0 -6
- package/cjs/mutators/scalar-mutators.js.map +0 -1
- package/cjs/mutators/string-mutators.d.ts +0 -72
- package/cjs/mutators/string-mutators.d.ts.map +0 -1
- package/cjs/mutators/string-mutators.js +0 -193
- package/cjs/mutators/string-mutators.js.map +0 -1
- package/cjs/plugins/index.d.ts +0 -7
- package/cjs/plugins/index.d.ts.map +0 -1
- package/cjs/plugins/plugin-system.d.ts +0 -71
- package/cjs/plugins/plugin-system.d.ts.map +0 -1
- package/cjs/plugins/plugin-system.js +0 -67
- package/cjs/plugins/plugin-system.js.map +0 -1
- package/cjs/rules/array/array-rules.d.ts +0 -12
- package/cjs/rules/array/array-rules.d.ts.map +0 -1
- package/cjs/rules/array/array-rules.js +0 -45
- package/cjs/rules/array/array-rules.js.map +0 -1
- package/cjs/rules/array/index.d.ts +0 -2
- package/cjs/rules/array/index.d.ts.map +0 -1
- package/cjs/rules/color/color-rules.d.ts +0 -30
- package/cjs/rules/color/color-rules.d.ts.map +0 -1
- package/cjs/rules/color/color-rules.js +0 -120
- package/cjs/rules/color/color-rules.js.map +0 -1
- package/cjs/rules/color/index.d.ts +0 -2
- package/cjs/rules/color/index.d.ts.map +0 -1
- package/cjs/rules/common/enum.d.ts +0 -26
- package/cjs/rules/common/enum.d.ts.map +0 -1
- package/cjs/rules/common/enum.js +0 -69
- package/cjs/rules/common/enum.js.map +0 -1
- package/cjs/rules/common/equals-field-rules.d.ts +0 -18
- package/cjs/rules/common/equals-field-rules.d.ts.map +0 -1
- package/cjs/rules/common/equals-field-rules.js +0 -39
- package/cjs/rules/common/equals-field-rules.js.map +0 -1
- package/cjs/rules/common/index.d.ts +0 -5
- package/cjs/rules/common/index.d.ts.map +0 -1
- package/cjs/rules/common/type-rules.d.ts +0 -38
- package/cjs/rules/common/type-rules.d.ts.map +0 -1
- package/cjs/rules/common/type-rules.js +0 -117
- package/cjs/rules/common/type-rules.js.map +0 -1
- package/cjs/rules/common/unknown-key.d.ts +0 -9
- package/cjs/rules/common/unknown-key.d.ts.map +0 -1
- package/cjs/rules/common/unknown-key.js +0 -17
- package/cjs/rules/common/unknown-key.js.map +0 -1
- package/cjs/rules/conditional/forbidden-if-rules.d.ts +0 -54
- package/cjs/rules/conditional/forbidden-if-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/forbidden-if-rules.js +0 -118
- package/cjs/rules/conditional/forbidden-if-rules.js.map +0 -1
- package/cjs/rules/conditional/index.d.ts +0 -11
- package/cjs/rules/conditional/index.d.ts.map +0 -1
- package/cjs/rules/conditional/present-if-rules.d.ts +0 -45
- package/cjs/rules/conditional/present-if-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/present-if-rules.js +0 -100
- package/cjs/rules/conditional/present-if-rules.js.map +0 -1
- package/cjs/rules/conditional/present-unless-rules.d.ts +0 -11
- package/cjs/rules/conditional/present-unless-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/present-unless-rules.js +0 -22
- package/cjs/rules/conditional/present-unless-rules.js.map +0 -1
- package/cjs/rules/conditional/present-with-rules.d.ts +0 -26
- package/cjs/rules/conditional/present-with-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/present-with-rules.js +0 -70
- package/cjs/rules/conditional/present-with-rules.js.map +0 -1
- package/cjs/rules/conditional/present-without-rules.d.ts +0 -26
- package/cjs/rules/conditional/present-without-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/present-without-rules.js +0 -70
- package/cjs/rules/conditional/present-without-rules.js.map +0 -1
- package/cjs/rules/conditional/required-if-rules.d.ts +0 -77
- package/cjs/rules/conditional/required-if-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/required-if-rules.js +0 -205
- package/cjs/rules/conditional/required-if-rules.js.map +0 -1
- package/cjs/rules/conditional/required-unless-rules.d.ts +0 -11
- package/cjs/rules/conditional/required-unless-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/required-unless-rules.js +0 -22
- package/cjs/rules/conditional/required-unless-rules.js.map +0 -1
- package/cjs/rules/conditional/required-when-rule.d.ts +0 -18
- package/cjs/rules/conditional/required-when-rule.d.ts.map +0 -1
- package/cjs/rules/conditional/required-when-rule.js +0 -26
- package/cjs/rules/conditional/required-when-rule.js.map +0 -1
- package/cjs/rules/conditional/required-with-rules.d.ts +0 -26
- package/cjs/rules/conditional/required-with-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/required-with-rules.js +0 -64
- package/cjs/rules/conditional/required-with-rules.js.map +0 -1
- package/cjs/rules/conditional/required-without-rules.d.ts +0 -26
- package/cjs/rules/conditional/required-without-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/required-without-rules.js +0 -64
- package/cjs/rules/conditional/required-without-rules.js.map +0 -1
- package/cjs/rules/core/equal.d.ts +0 -8
- package/cjs/rules/core/equal.d.ts.map +0 -1
- package/cjs/rules/core/equal.js +0 -14
- package/cjs/rules/core/equal.js.map +0 -1
- package/cjs/rules/core/forbidden.d.ts +0 -6
- package/cjs/rules/core/forbidden.d.ts.map +0 -1
- package/cjs/rules/core/forbidden.js +0 -13
- package/cjs/rules/core/forbidden.js.map +0 -1
- package/cjs/rules/core/index.d.ts +0 -6
- package/cjs/rules/core/index.d.ts.map +0 -1
- package/cjs/rules/core/required.d.ts +0 -11
- package/cjs/rules/core/required.d.ts.map +0 -1
- package/cjs/rules/core/required.js +0 -31
- package/cjs/rules/core/required.js.map +0 -1
- package/cjs/rules/core/union.d.ts +0 -9
- package/cjs/rules/core/union.d.ts.map +0 -1
- package/cjs/rules/core/union.js +0 -40
- package/cjs/rules/core/union.js.map +0 -1
- package/cjs/rules/core/when.d.ts +0 -6
- package/cjs/rules/core/when.d.ts.map +0 -1
- package/cjs/rules/core/when.js +0 -40
- package/cjs/rules/core/when.js.map +0 -1
- package/cjs/rules/date/date-comparison-rules.d.ts +0 -25
- package/cjs/rules/date/date-comparison-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-comparison-rules.js +0 -80
- package/cjs/rules/date/date-comparison-rules.js.map +0 -1
- package/cjs/rules/date/date-day-rules.d.ts +0 -21
- package/cjs/rules/date/date-day-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-day-rules.js +0 -68
- package/cjs/rules/date/date-day-rules.js.map +0 -1
- package/cjs/rules/date/date-field-comparison-rules.d.ts +0 -28
- package/cjs/rules/date/date-field-comparison-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-field-comparison-rules.js +0 -94
- package/cjs/rules/date/date-field-comparison-rules.js.map +0 -1
- package/cjs/rules/date/date-period-rules.d.ts +0 -124
- package/cjs/rules/date/date-period-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-period-rules.js +0 -605
- package/cjs/rules/date/date-period-rules.js.map +0 -1
- package/cjs/rules/date/date-relative-rules.d.ts +0 -20
- package/cjs/rules/date/date-relative-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-relative-rules.js +0 -60
- package/cjs/rules/date/date-relative-rules.js.map +0 -1
- package/cjs/rules/date/date-special-rules.d.ts +0 -20
- package/cjs/rules/date/date-special-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-special-rules.js +0 -71
- package/cjs/rules/date/date-special-rules.js.map +0 -1
- package/cjs/rules/date/date.d.ts +0 -93
- package/cjs/rules/date/date.d.ts.map +0 -1
- package/cjs/rules/date/date.js +0 -288
- package/cjs/rules/date/date.js.map +0 -1
- package/cjs/rules/date/index.d.ts +0 -8
- package/cjs/rules/date/index.d.ts.map +0 -1
- package/cjs/rules/file/dimensions.d.ts +0 -26
- package/cjs/rules/file/dimensions.d.ts.map +0 -1
- package/cjs/rules/file/dimensions.js +0 -60
- package/cjs/rules/file/dimensions.js.map +0 -1
- package/cjs/rules/file/file-size.d.ts +0 -14
- package/cjs/rules/file/file-size.d.ts.map +0 -1
- package/cjs/rules/file/file-size.js +0 -30
- package/cjs/rules/file/file-size.js.map +0 -1
- package/cjs/rules/file/index.d.ts +0 -11
- package/cjs/rules/file/index.d.ts.map +0 -1
- package/cjs/rules/index.d.ts +0 -19
- package/cjs/rules/index.d.ts.map +0 -1
- package/cjs/rules/length/index.d.ts +0 -2
- package/cjs/rules/length/index.d.ts.map +0 -1
- package/cjs/rules/length/length-rules.d.ts +0 -49
- package/cjs/rules/length/length-rules.d.ts.map +0 -1
- package/cjs/rules/length/length-rules.js +0 -107
- package/cjs/rules/length/length-rules.js.map +0 -1
- package/cjs/rules/number/index.d.ts +0 -2
- package/cjs/rules/number/index.d.ts.map +0 -1
- package/cjs/rules/number/number-rules.d.ts +0 -65
- package/cjs/rules/number/number-rules.d.ts.map +0 -1
- package/cjs/rules/number/number-rules.js +0 -245
- package/cjs/rules/number/number-rules.js.map +0 -1
- package/cjs/rules/scalar/accepted-rule.d.ts +0 -39
- package/cjs/rules/scalar/accepted-rule.d.ts.map +0 -1
- package/cjs/rules/scalar/accepted-rule.js +0 -117
- package/cjs/rules/scalar/accepted-rule.js.map +0 -1
- package/cjs/rules/scalar/declined-rule.d.ts +0 -39
- package/cjs/rules/scalar/declined-rule.d.ts.map +0 -1
- package/cjs/rules/scalar/declined-rule.js +0 -117
- package/cjs/rules/scalar/declined-rule.js.map +0 -1
- package/cjs/rules/scalar/index.d.ts +0 -3
- package/cjs/rules/scalar/index.d.ts.map +0 -1
- package/cjs/rules/string/alpha.d.ts +0 -14
- package/cjs/rules/string/alpha.d.ts.map +0 -1
- package/cjs/rules/string/alpha.js +0 -39
- package/cjs/rules/string/alpha.js.map +0 -1
- package/cjs/rules/string/credit-card.d.ts +0 -6
- package/cjs/rules/string/credit-card.d.ts.map +0 -1
- package/cjs/rules/string/credit-card.js +0 -31
- package/cjs/rules/string/credit-card.js.map +0 -1
- package/cjs/rules/string/email.d.ts +0 -6
- package/cjs/rules/string/email.d.ts.map +0 -1
- package/cjs/rules/string/email.js +0 -13
- package/cjs/rules/string/email.js.map +0 -1
- package/cjs/rules/string/index.d.ts +0 -17
- package/cjs/rules/string/index.d.ts.map +0 -1
- package/cjs/rules/string/ip.d.ts +0 -14
- package/cjs/rules/string/ip.d.ts.map +0 -1
- package/cjs/rules/string/ip.js +0 -39
- package/cjs/rules/string/ip.js.map +0 -1
- package/cjs/rules/string/matches.d.ts +0 -8
- package/cjs/rules/string/matches.d.ts.map +0 -1
- package/cjs/rules/string/matches.js +0 -15
- package/cjs/rules/string/matches.js.map +0 -1
- package/cjs/rules/string/pattern.d.ts +0 -8
- package/cjs/rules/string/pattern.d.ts.map +0 -1
- package/cjs/rules/string/pattern.js +0 -14
- package/cjs/rules/string/pattern.js.map +0 -1
- package/cjs/rules/string/string-comparison.d.ts +0 -26
- package/cjs/rules/string/string-comparison.d.ts.map +0 -1
- package/cjs/rules/string/string-comparison.js +0 -56
- package/cjs/rules/string/string-comparison.js.map +0 -1
- package/cjs/rules/string/strong-password-rule.d.ts +0 -14
- package/cjs/rules/string/strong-password-rule.d.ts.map +0 -1
- package/cjs/rules/string/strong-password-rule.js +0 -38
- package/cjs/rules/string/strong-password-rule.js.map +0 -1
- package/cjs/rules/string/url.d.ts +0 -6
- package/cjs/rules/string/url.d.ts.map +0 -1
- package/cjs/rules/string/url.js +0 -16
- package/cjs/rules/string/url.js.map +0 -1
- package/cjs/rules/string/without-whitespace.d.ts +0 -6
- package/cjs/rules/string/without-whitespace.d.ts.map +0 -1
- package/cjs/rules/string/without-whitespace.js +0 -13
- package/cjs/rules/string/without-whitespace.js.map +0 -1
- package/cjs/standard-schema/index.d.ts +0 -4
- package/cjs/standard-schema/index.d.ts.map +0 -1
- package/cjs/standard-schema/json-schema.d.ts +0 -61
- package/cjs/standard-schema/json-schema.d.ts.map +0 -1
- package/cjs/standard-schema/json-schema.js +0 -85
- package/cjs/standard-schema/json-schema.js.map +0 -1
- package/cjs/standard-schema/map-result.d.ts +0 -18
- package/cjs/standard-schema/map-result.d.ts.map +0 -1
- package/cjs/standard-schema/map-result.js +0 -27
- package/cjs/standard-schema/map-result.js.map +0 -1
- package/cjs/standard-schema/types.d.ts +0 -93
- package/cjs/standard-schema/types.d.ts.map +0 -1
- package/cjs/types/conditional-types.d.ts +0 -15
- package/cjs/types/conditional-types.d.ts.map +0 -1
- package/cjs/types/context-types.d.ts +0 -47
- package/cjs/types/context-types.d.ts.map +0 -1
- package/cjs/types/data-transformer-types.d.ts +0 -25
- package/cjs/types/data-transformer-types.d.ts.map +0 -1
- package/cjs/types/date-types.d.ts +0 -9
- package/cjs/types/date-types.d.ts.map +0 -1
- package/cjs/types/date-types.js +0 -12
- package/cjs/types/date-types.js.map +0 -1
- package/cjs/types/file.types.d.ts +0 -5
- package/cjs/types/file.types.d.ts.map +0 -1
- package/cjs/types/index.d.ts +0 -11
- package/cjs/types/index.d.ts.map +0 -1
- package/cjs/types/inference-types.d.ts +0 -32
- package/cjs/types/inference-types.d.ts.map +0 -1
- package/cjs/types/mutator-types.d.ts +0 -27
- package/cjs/types/mutator-types.d.ts.map +0 -1
- package/cjs/types/result-types.d.ts +0 -19
- package/cjs/types/result-types.d.ts.map +0 -1
- package/cjs/types/rule-types.d.ts +0 -58
- package/cjs/types/rule-types.d.ts.map +0 -1
- package/cjs/types/schema-types.d.ts +0 -6
- package/cjs/types/schema-types.d.ts.map +0 -1
- package/cjs/validators/any-validator.d.ts +0 -29
- package/cjs/validators/any-validator.d.ts.map +0 -1
- package/cjs/validators/any-validator.js +0 -31
- package/cjs/validators/any-validator.js.map +0 -1
- package/cjs/validators/array-validator.d.ts +0 -72
- package/cjs/validators/array-validator.d.ts.map +0 -1
- package/cjs/validators/array-validator.js +0 -162
- package/cjs/validators/array-validator.js.map +0 -1
- package/cjs/validators/base-validator.d.ts +0 -425
- package/cjs/validators/base-validator.d.ts.map +0 -1
- package/cjs/validators/base-validator.js +0 -637
- package/cjs/validators/base-validator.js.map +0 -1
- package/cjs/validators/boolean-validator.d.ts +0 -67
- package/cjs/validators/boolean-validator.d.ts.map +0 -1
- package/cjs/validators/boolean-validator.js +0 -105
- package/cjs/validators/boolean-validator.js.map +0 -1
- package/cjs/validators/computed-validator.d.ts +0 -75
- package/cjs/validators/computed-validator.d.ts.map +0 -1
- package/cjs/validators/computed-validator.js +0 -124
- package/cjs/validators/computed-validator.js.map +0 -1
- package/cjs/validators/date-validator.d.ts +0 -330
- package/cjs/validators/date-validator.d.ts.map +0 -1
- package/cjs/validators/date-validator.js +0 -614
- package/cjs/validators/date-validator.js.map +0 -1
- package/cjs/validators/float-validator.d.ts +0 -8
- package/cjs/validators/float-validator.d.ts.map +0 -1
- package/cjs/validators/float-validator.js +0 -9
- package/cjs/validators/float-validator.js.map +0 -1
- package/cjs/validators/index.d.ts +0 -31
- package/cjs/validators/index.d.ts.map +0 -1
- package/cjs/validators/int-validator.d.ts +0 -19
- package/cjs/validators/int-validator.d.ts.map +0 -1
- package/cjs/validators/int-validator.js +0 -21
- package/cjs/validators/int-validator.js.map +0 -1
- package/cjs/validators/managed-validator.d.ts +0 -38
- package/cjs/validators/managed-validator.d.ts.map +0 -1
- package/cjs/validators/managed-validator.js +0 -34
- package/cjs/validators/managed-validator.js.map +0 -1
- package/cjs/validators/methods/equality-conditional-methods.d.ts +0 -88
- package/cjs/validators/methods/equality-conditional-methods.d.ts.map +0 -1
- package/cjs/validators/methods/equality-conditional-methods.js +0 -118
- package/cjs/validators/methods/equality-conditional-methods.js.map +0 -1
- package/cjs/validators/methods/forbidden-methods.d.ts +0 -58
- package/cjs/validators/methods/forbidden-methods.d.ts.map +0 -1
- package/cjs/validators/methods/forbidden-methods.js +0 -122
- package/cjs/validators/methods/forbidden-methods.js.map +0 -1
- package/cjs/validators/methods/present-methods.d.ts +0 -102
- package/cjs/validators/methods/present-methods.d.ts.map +0 -1
- package/cjs/validators/methods/present-methods.js +0 -229
- package/cjs/validators/methods/present-methods.js.map +0 -1
- package/cjs/validators/methods/required-methods.d.ts +0 -174
- package/cjs/validators/methods/required-methods.d.ts.map +0 -1
- package/cjs/validators/methods/required-methods.js +0 -246
- package/cjs/validators/methods/required-methods.js.map +0 -1
- package/cjs/validators/number-validator.d.ts +0 -166
- package/cjs/validators/number-validator.d.ts.map +0 -1
- package/cjs/validators/number-validator.js +0 -307
- package/cjs/validators/number-validator.js.map +0 -1
- package/cjs/validators/numeric-validator.d.ts +0 -15
- package/cjs/validators/numeric-validator.d.ts.map +0 -1
- package/cjs/validators/numeric-validator.js +0 -18
- package/cjs/validators/numeric-validator.js.map +0 -1
- package/cjs/validators/object-validator.d.ts +0 -233
- package/cjs/validators/object-validator.d.ts.map +0 -1
- package/cjs/validators/object-validator.js +0 -517
- package/cjs/validators/object-validator.js.map +0 -1
- package/cjs/validators/primitive-validator.d.ts +0 -70
- package/cjs/validators/primitive-validator.d.ts.map +0 -1
- package/cjs/validators/primitive-validator.js +0 -80
- package/cjs/validators/primitive-validator.js.map +0 -1
- package/cjs/validators/record-validator.d.ts +0 -54
- package/cjs/validators/record-validator.d.ts.map +0 -1
- package/cjs/validators/record-validator.js +0 -100
- package/cjs/validators/record-validator.js.map +0 -1
- package/cjs/validators/scalar-validator.d.ts +0 -93
- package/cjs/validators/scalar-validator.d.ts.map +0 -1
- package/cjs/validators/scalar-validator.js +0 -149
- package/cjs/validators/scalar-validator.js.map +0 -1
- package/cjs/validators/string-validator.d.ts +0 -189
- package/cjs/validators/string-validator.d.ts.map +0 -1
- package/cjs/validators/string-validator.js +0 -387
- package/cjs/validators/string-validator.js.map +0 -1
- package/cjs/validators/tuple-validator.d.ts +0 -56
- package/cjs/validators/tuple-validator.d.ts.map +0 -1
- package/cjs/validators/tuple-validator.js +0 -121
- package/cjs/validators/tuple-validator.js.map +0 -1
- package/cjs/validators/union-validator.d.ts +0 -55
- package/cjs/validators/union-validator.d.ts.map +0 -1
- package/cjs/validators/union-validator.js +0 -60
- package/cjs/validators/union-validator.js.map +0 -1
- package/esm/config.d.ts +0 -48
- package/esm/config.d.ts.map +0 -1
- package/esm/config.js +0 -42
- package/esm/config.js.map +0 -1
- package/esm/factory/index.d.ts +0 -3
- package/esm/factory/index.d.ts.map +0 -1
- package/esm/factory/validate.d.ts +0 -8
- package/esm/factory/validate.d.ts.map +0 -1
- package/esm/factory/validate.js +0 -23
- package/esm/factory/validate.js.map +0 -1
- package/esm/factory/validators.d.ts +0 -56
- package/esm/factory/validators.d.ts.map +0 -1
- package/esm/factory/validators.js +0 -47
- package/esm/factory/validators.js.map +0 -1
- package/esm/helpers/date-helpers.d.ts +0 -16
- package/esm/helpers/date-helpers.d.ts.map +0 -1
- package/esm/helpers/date-helpers.js +0 -20
- package/esm/helpers/date-helpers.js.map +0 -1
- package/esm/helpers/file.utils.d.ts +0 -8
- package/esm/helpers/file.utils.d.ts.map +0 -1
- package/esm/helpers/file.utils.js +0 -29
- package/esm/helpers/file.utils.js.map +0 -1
- package/esm/helpers/get-field-value.d.ts +0 -37
- package/esm/helpers/get-field-value.d.ts.map +0 -1
- package/esm/helpers/get-field-value.js +0 -40
- package/esm/helpers/get-field-value.js.map +0 -1
- package/esm/helpers/index.d.ts +0 -6
- package/esm/helpers/index.d.ts.map +0 -1
- package/esm/helpers/is-empty-value.d.ts +0 -2
- package/esm/helpers/is-empty-value.d.ts.map +0 -1
- package/esm/helpers/is-empty-value.js +0 -3
- package/esm/helpers/is-empty-value.js.map +0 -1
- package/esm/helpers/path-helpers.d.ts +0 -5
- package/esm/helpers/path-helpers.d.ts.map +0 -1
- package/esm/helpers/path-helpers.js +0 -8
- package/esm/helpers/path-helpers.js.map +0 -1
- package/esm/helpers/validation-helpers.d.ts +0 -26
- package/esm/helpers/validation-helpers.d.ts.map +0 -1
- package/esm/helpers/validation-helpers.js +0 -74
- package/esm/helpers/validation-helpers.js.map +0 -1
- package/esm/index.d.ts +0 -30
- package/esm/index.d.ts.map +0 -1
- package/esm/index.js +0 -1
- package/esm/index.js.map +0 -1
- package/esm/mutators/array-mutators.d.ts +0 -12
- package/esm/mutators/array-mutators.d.ts.map +0 -1
- package/esm/mutators/array-mutators.js +0 -37
- package/esm/mutators/array-mutators.js.map +0 -1
- package/esm/mutators/date-mutators.d.ts +0 -39
- package/esm/mutators/date-mutators.d.ts.map +0 -1
- package/esm/mutators/date-mutators.js +0 -120
- package/esm/mutators/date-mutators.js.map +0 -1
- package/esm/mutators/index.d.ts +0 -7
- package/esm/mutators/index.d.ts.map +0 -1
- package/esm/mutators/number-mutators.d.ts +0 -22
- package/esm/mutators/number-mutators.d.ts.map +0 -1
- package/esm/mutators/number-mutators.js +0 -53
- package/esm/mutators/number-mutators.js.map +0 -1
- package/esm/mutators/object-mutators.d.ts +0 -8
- package/esm/mutators/object-mutators.d.ts.map +0 -1
- package/esm/mutators/object-mutators.js +0 -48
- package/esm/mutators/object-mutators.js.map +0 -1
- package/esm/mutators/scalar-mutators.d.ts +0 -3
- package/esm/mutators/scalar-mutators.d.ts.map +0 -1
- package/esm/mutators/scalar-mutators.js +0 -6
- package/esm/mutators/scalar-mutators.js.map +0 -1
- package/esm/mutators/string-mutators.d.ts +0 -72
- package/esm/mutators/string-mutators.d.ts.map +0 -1
- package/esm/mutators/string-mutators.js +0 -193
- package/esm/mutators/string-mutators.js.map +0 -1
- package/esm/plugins/index.d.ts +0 -7
- package/esm/plugins/index.d.ts.map +0 -1
- package/esm/plugins/plugin-system.d.ts +0 -71
- package/esm/plugins/plugin-system.d.ts.map +0 -1
- package/esm/plugins/plugin-system.js +0 -67
- package/esm/plugins/plugin-system.js.map +0 -1
- package/esm/rules/array/array-rules.d.ts +0 -12
- package/esm/rules/array/array-rules.d.ts.map +0 -1
- package/esm/rules/array/array-rules.js +0 -45
- package/esm/rules/array/array-rules.js.map +0 -1
- package/esm/rules/array/index.d.ts +0 -2
- package/esm/rules/array/index.d.ts.map +0 -1
- package/esm/rules/color/color-rules.d.ts +0 -30
- package/esm/rules/color/color-rules.d.ts.map +0 -1
- package/esm/rules/color/color-rules.js +0 -120
- package/esm/rules/color/color-rules.js.map +0 -1
- package/esm/rules/color/index.d.ts +0 -2
- package/esm/rules/color/index.d.ts.map +0 -1
- package/esm/rules/common/enum.d.ts +0 -26
- package/esm/rules/common/enum.d.ts.map +0 -1
- package/esm/rules/common/enum.js +0 -69
- package/esm/rules/common/enum.js.map +0 -1
- package/esm/rules/common/equals-field-rules.d.ts +0 -18
- package/esm/rules/common/equals-field-rules.d.ts.map +0 -1
- package/esm/rules/common/equals-field-rules.js +0 -39
- package/esm/rules/common/equals-field-rules.js.map +0 -1
- package/esm/rules/common/index.d.ts +0 -5
- package/esm/rules/common/index.d.ts.map +0 -1
- package/esm/rules/common/type-rules.d.ts +0 -38
- package/esm/rules/common/type-rules.d.ts.map +0 -1
- package/esm/rules/common/type-rules.js +0 -117
- package/esm/rules/common/type-rules.js.map +0 -1
- package/esm/rules/common/unknown-key.d.ts +0 -9
- package/esm/rules/common/unknown-key.d.ts.map +0 -1
- package/esm/rules/common/unknown-key.js +0 -17
- package/esm/rules/common/unknown-key.js.map +0 -1
- package/esm/rules/conditional/forbidden-if-rules.d.ts +0 -54
- package/esm/rules/conditional/forbidden-if-rules.d.ts.map +0 -1
- package/esm/rules/conditional/forbidden-if-rules.js +0 -118
- package/esm/rules/conditional/forbidden-if-rules.js.map +0 -1
- package/esm/rules/conditional/index.d.ts +0 -11
- package/esm/rules/conditional/index.d.ts.map +0 -1
- package/esm/rules/conditional/present-if-rules.d.ts +0 -45
- package/esm/rules/conditional/present-if-rules.d.ts.map +0 -1
- package/esm/rules/conditional/present-if-rules.js +0 -100
- package/esm/rules/conditional/present-if-rules.js.map +0 -1
- package/esm/rules/conditional/present-unless-rules.d.ts +0 -11
- package/esm/rules/conditional/present-unless-rules.d.ts.map +0 -1
- package/esm/rules/conditional/present-unless-rules.js +0 -22
- package/esm/rules/conditional/present-unless-rules.js.map +0 -1
- package/esm/rules/conditional/present-with-rules.d.ts +0 -26
- package/esm/rules/conditional/present-with-rules.d.ts.map +0 -1
- package/esm/rules/conditional/present-with-rules.js +0 -70
- package/esm/rules/conditional/present-with-rules.js.map +0 -1
- package/esm/rules/conditional/present-without-rules.d.ts +0 -26
- package/esm/rules/conditional/present-without-rules.d.ts.map +0 -1
- package/esm/rules/conditional/present-without-rules.js +0 -70
- package/esm/rules/conditional/present-without-rules.js.map +0 -1
- package/esm/rules/conditional/required-if-rules.d.ts +0 -77
- package/esm/rules/conditional/required-if-rules.d.ts.map +0 -1
- package/esm/rules/conditional/required-if-rules.js +0 -205
- package/esm/rules/conditional/required-if-rules.js.map +0 -1
- package/esm/rules/conditional/required-unless-rules.d.ts +0 -11
- package/esm/rules/conditional/required-unless-rules.d.ts.map +0 -1
- package/esm/rules/conditional/required-unless-rules.js +0 -22
- package/esm/rules/conditional/required-unless-rules.js.map +0 -1
- package/esm/rules/conditional/required-when-rule.d.ts +0 -18
- package/esm/rules/conditional/required-when-rule.d.ts.map +0 -1
- package/esm/rules/conditional/required-when-rule.js +0 -26
- package/esm/rules/conditional/required-when-rule.js.map +0 -1
- package/esm/rules/conditional/required-with-rules.d.ts +0 -26
- package/esm/rules/conditional/required-with-rules.d.ts.map +0 -1
- package/esm/rules/conditional/required-with-rules.js +0 -64
- package/esm/rules/conditional/required-with-rules.js.map +0 -1
- package/esm/rules/conditional/required-without-rules.d.ts +0 -26
- package/esm/rules/conditional/required-without-rules.d.ts.map +0 -1
- package/esm/rules/conditional/required-without-rules.js +0 -64
- package/esm/rules/conditional/required-without-rules.js.map +0 -1
- package/esm/rules/core/equal.d.ts +0 -8
- package/esm/rules/core/equal.d.ts.map +0 -1
- package/esm/rules/core/equal.js +0 -14
- package/esm/rules/core/equal.js.map +0 -1
- package/esm/rules/core/forbidden.d.ts +0 -6
- package/esm/rules/core/forbidden.d.ts.map +0 -1
- package/esm/rules/core/forbidden.js +0 -13
- package/esm/rules/core/forbidden.js.map +0 -1
- package/esm/rules/core/index.d.ts +0 -6
- package/esm/rules/core/index.d.ts.map +0 -1
- package/esm/rules/core/required.d.ts +0 -11
- package/esm/rules/core/required.d.ts.map +0 -1
- package/esm/rules/core/required.js +0 -31
- package/esm/rules/core/required.js.map +0 -1
- package/esm/rules/core/union.d.ts +0 -9
- package/esm/rules/core/union.d.ts.map +0 -1
- package/esm/rules/core/union.js +0 -40
- package/esm/rules/core/union.js.map +0 -1
- package/esm/rules/core/when.d.ts +0 -6
- package/esm/rules/core/when.d.ts.map +0 -1
- package/esm/rules/core/when.js +0 -40
- package/esm/rules/core/when.js.map +0 -1
- package/esm/rules/date/date-comparison-rules.d.ts +0 -25
- package/esm/rules/date/date-comparison-rules.d.ts.map +0 -1
- package/esm/rules/date/date-comparison-rules.js +0 -80
- package/esm/rules/date/date-comparison-rules.js.map +0 -1
- package/esm/rules/date/date-day-rules.d.ts +0 -21
- package/esm/rules/date/date-day-rules.d.ts.map +0 -1
- package/esm/rules/date/date-day-rules.js +0 -68
- package/esm/rules/date/date-day-rules.js.map +0 -1
- package/esm/rules/date/date-field-comparison-rules.d.ts +0 -28
- package/esm/rules/date/date-field-comparison-rules.d.ts.map +0 -1
- package/esm/rules/date/date-field-comparison-rules.js +0 -94
- package/esm/rules/date/date-field-comparison-rules.js.map +0 -1
- package/esm/rules/date/date-period-rules.d.ts +0 -124
- package/esm/rules/date/date-period-rules.d.ts.map +0 -1
- package/esm/rules/date/date-period-rules.js +0 -605
- package/esm/rules/date/date-period-rules.js.map +0 -1
- package/esm/rules/date/date-relative-rules.d.ts +0 -20
- package/esm/rules/date/date-relative-rules.d.ts.map +0 -1
- package/esm/rules/date/date-relative-rules.js +0 -60
- package/esm/rules/date/date-relative-rules.js.map +0 -1
- package/esm/rules/date/date-special-rules.d.ts +0 -20
- package/esm/rules/date/date-special-rules.d.ts.map +0 -1
- package/esm/rules/date/date-special-rules.js +0 -71
- package/esm/rules/date/date-special-rules.js.map +0 -1
- package/esm/rules/date/date.d.ts +0 -93
- package/esm/rules/date/date.d.ts.map +0 -1
- package/esm/rules/date/date.js +0 -288
- package/esm/rules/date/date.js.map +0 -1
- package/esm/rules/date/index.d.ts +0 -8
- package/esm/rules/date/index.d.ts.map +0 -1
- package/esm/rules/file/dimensions.d.ts +0 -26
- package/esm/rules/file/dimensions.d.ts.map +0 -1
- package/esm/rules/file/dimensions.js +0 -60
- package/esm/rules/file/dimensions.js.map +0 -1
- package/esm/rules/file/file-size.d.ts +0 -14
- package/esm/rules/file/file-size.d.ts.map +0 -1
- package/esm/rules/file/file-size.js +0 -30
- package/esm/rules/file/file-size.js.map +0 -1
- package/esm/rules/file/index.d.ts +0 -11
- package/esm/rules/file/index.d.ts.map +0 -1
- package/esm/rules/index.d.ts +0 -19
- package/esm/rules/index.d.ts.map +0 -1
- package/esm/rules/length/index.d.ts +0 -2
- package/esm/rules/length/index.d.ts.map +0 -1
- package/esm/rules/length/length-rules.d.ts +0 -49
- package/esm/rules/length/length-rules.d.ts.map +0 -1
- package/esm/rules/length/length-rules.js +0 -107
- package/esm/rules/length/length-rules.js.map +0 -1
- package/esm/rules/number/index.d.ts +0 -2
- package/esm/rules/number/index.d.ts.map +0 -1
- package/esm/rules/number/number-rules.d.ts +0 -65
- package/esm/rules/number/number-rules.d.ts.map +0 -1
- package/esm/rules/number/number-rules.js +0 -245
- package/esm/rules/number/number-rules.js.map +0 -1
- package/esm/rules/scalar/accepted-rule.d.ts +0 -39
- package/esm/rules/scalar/accepted-rule.d.ts.map +0 -1
- package/esm/rules/scalar/accepted-rule.js +0 -117
- package/esm/rules/scalar/accepted-rule.js.map +0 -1
- package/esm/rules/scalar/declined-rule.d.ts +0 -39
- package/esm/rules/scalar/declined-rule.d.ts.map +0 -1
- package/esm/rules/scalar/declined-rule.js +0 -117
- package/esm/rules/scalar/declined-rule.js.map +0 -1
- package/esm/rules/scalar/index.d.ts +0 -3
- package/esm/rules/scalar/index.d.ts.map +0 -1
- package/esm/rules/string/alpha.d.ts +0 -14
- package/esm/rules/string/alpha.d.ts.map +0 -1
- package/esm/rules/string/alpha.js +0 -39
- package/esm/rules/string/alpha.js.map +0 -1
- package/esm/rules/string/credit-card.d.ts +0 -6
- package/esm/rules/string/credit-card.d.ts.map +0 -1
- package/esm/rules/string/credit-card.js +0 -31
- package/esm/rules/string/credit-card.js.map +0 -1
- package/esm/rules/string/email.d.ts +0 -6
- package/esm/rules/string/email.d.ts.map +0 -1
- package/esm/rules/string/email.js +0 -13
- package/esm/rules/string/email.js.map +0 -1
- package/esm/rules/string/index.d.ts +0 -17
- package/esm/rules/string/index.d.ts.map +0 -1
- package/esm/rules/string/ip.d.ts +0 -14
- package/esm/rules/string/ip.d.ts.map +0 -1
- package/esm/rules/string/ip.js +0 -39
- package/esm/rules/string/ip.js.map +0 -1
- package/esm/rules/string/matches.d.ts +0 -8
- package/esm/rules/string/matches.d.ts.map +0 -1
- package/esm/rules/string/matches.js +0 -15
- package/esm/rules/string/matches.js.map +0 -1
- package/esm/rules/string/pattern.d.ts +0 -8
- package/esm/rules/string/pattern.d.ts.map +0 -1
- package/esm/rules/string/pattern.js +0 -14
- package/esm/rules/string/pattern.js.map +0 -1
- package/esm/rules/string/string-comparison.d.ts +0 -26
- package/esm/rules/string/string-comparison.d.ts.map +0 -1
- package/esm/rules/string/string-comparison.js +0 -56
- package/esm/rules/string/string-comparison.js.map +0 -1
- package/esm/rules/string/strong-password-rule.d.ts +0 -14
- package/esm/rules/string/strong-password-rule.d.ts.map +0 -1
- package/esm/rules/string/strong-password-rule.js +0 -38
- package/esm/rules/string/strong-password-rule.js.map +0 -1
- package/esm/rules/string/url.d.ts +0 -6
- package/esm/rules/string/url.d.ts.map +0 -1
- package/esm/rules/string/url.js +0 -16
- package/esm/rules/string/url.js.map +0 -1
- package/esm/rules/string/without-whitespace.d.ts +0 -6
- package/esm/rules/string/without-whitespace.d.ts.map +0 -1
- package/esm/rules/string/without-whitespace.js +0 -13
- package/esm/rules/string/without-whitespace.js.map +0 -1
- package/esm/standard-schema/index.d.ts +0 -4
- package/esm/standard-schema/index.d.ts.map +0 -1
- package/esm/standard-schema/json-schema.d.ts +0 -61
- package/esm/standard-schema/json-schema.d.ts.map +0 -1
- package/esm/standard-schema/json-schema.js +0 -85
- package/esm/standard-schema/json-schema.js.map +0 -1
- package/esm/standard-schema/map-result.d.ts +0 -18
- package/esm/standard-schema/map-result.d.ts.map +0 -1
- package/esm/standard-schema/map-result.js +0 -27
- package/esm/standard-schema/map-result.js.map +0 -1
- package/esm/standard-schema/types.d.ts +0 -93
- package/esm/standard-schema/types.d.ts.map +0 -1
- package/esm/types/conditional-types.d.ts +0 -15
- package/esm/types/conditional-types.d.ts.map +0 -1
- package/esm/types/context-types.d.ts +0 -47
- package/esm/types/context-types.d.ts.map +0 -1
- package/esm/types/data-transformer-types.d.ts +0 -25
- package/esm/types/data-transformer-types.d.ts.map +0 -1
- package/esm/types/date-types.d.ts +0 -9
- package/esm/types/date-types.d.ts.map +0 -1
- package/esm/types/date-types.js +0 -12
- package/esm/types/date-types.js.map +0 -1
- package/esm/types/file.types.d.ts +0 -5
- package/esm/types/file.types.d.ts.map +0 -1
- package/esm/types/index.d.ts +0 -11
- package/esm/types/index.d.ts.map +0 -1
- package/esm/types/inference-types.d.ts +0 -32
- package/esm/types/inference-types.d.ts.map +0 -1
- package/esm/types/mutator-types.d.ts +0 -27
- package/esm/types/mutator-types.d.ts.map +0 -1
- package/esm/types/result-types.d.ts +0 -19
- package/esm/types/result-types.d.ts.map +0 -1
- package/esm/types/rule-types.d.ts +0 -58
- package/esm/types/rule-types.d.ts.map +0 -1
- package/esm/types/schema-types.d.ts +0 -6
- package/esm/types/schema-types.d.ts.map +0 -1
- package/esm/validators/any-validator.d.ts +0 -29
- package/esm/validators/any-validator.d.ts.map +0 -1
- package/esm/validators/any-validator.js +0 -31
- package/esm/validators/any-validator.js.map +0 -1
- package/esm/validators/array-validator.d.ts +0 -72
- package/esm/validators/array-validator.d.ts.map +0 -1
- package/esm/validators/array-validator.js +0 -162
- package/esm/validators/array-validator.js.map +0 -1
- package/esm/validators/base-validator.d.ts +0 -425
- package/esm/validators/base-validator.d.ts.map +0 -1
- package/esm/validators/base-validator.js +0 -637
- package/esm/validators/base-validator.js.map +0 -1
- package/esm/validators/boolean-validator.d.ts +0 -67
- package/esm/validators/boolean-validator.d.ts.map +0 -1
- package/esm/validators/boolean-validator.js +0 -105
- package/esm/validators/boolean-validator.js.map +0 -1
- package/esm/validators/computed-validator.d.ts +0 -75
- package/esm/validators/computed-validator.d.ts.map +0 -1
- package/esm/validators/computed-validator.js +0 -124
- package/esm/validators/computed-validator.js.map +0 -1
- package/esm/validators/date-validator.d.ts +0 -330
- package/esm/validators/date-validator.d.ts.map +0 -1
- package/esm/validators/date-validator.js +0 -614
- package/esm/validators/date-validator.js.map +0 -1
- package/esm/validators/float-validator.d.ts +0 -8
- package/esm/validators/float-validator.d.ts.map +0 -1
- package/esm/validators/float-validator.js +0 -9
- package/esm/validators/float-validator.js.map +0 -1
- package/esm/validators/index.d.ts +0 -31
- package/esm/validators/index.d.ts.map +0 -1
- package/esm/validators/int-validator.d.ts +0 -19
- package/esm/validators/int-validator.d.ts.map +0 -1
- package/esm/validators/int-validator.js +0 -21
- package/esm/validators/int-validator.js.map +0 -1
- package/esm/validators/managed-validator.d.ts +0 -38
- package/esm/validators/managed-validator.d.ts.map +0 -1
- package/esm/validators/managed-validator.js +0 -34
- package/esm/validators/managed-validator.js.map +0 -1
- package/esm/validators/methods/equality-conditional-methods.d.ts +0 -88
- package/esm/validators/methods/equality-conditional-methods.d.ts.map +0 -1
- package/esm/validators/methods/equality-conditional-methods.js +0 -118
- package/esm/validators/methods/equality-conditional-methods.js.map +0 -1
- package/esm/validators/methods/forbidden-methods.d.ts +0 -58
- package/esm/validators/methods/forbidden-methods.d.ts.map +0 -1
- package/esm/validators/methods/forbidden-methods.js +0 -122
- package/esm/validators/methods/forbidden-methods.js.map +0 -1
- package/esm/validators/methods/present-methods.d.ts +0 -102
- package/esm/validators/methods/present-methods.d.ts.map +0 -1
- package/esm/validators/methods/present-methods.js +0 -229
- package/esm/validators/methods/present-methods.js.map +0 -1
- package/esm/validators/methods/required-methods.d.ts +0 -174
- package/esm/validators/methods/required-methods.d.ts.map +0 -1
- package/esm/validators/methods/required-methods.js +0 -246
- package/esm/validators/methods/required-methods.js.map +0 -1
- package/esm/validators/number-validator.d.ts +0 -166
- package/esm/validators/number-validator.d.ts.map +0 -1
- package/esm/validators/number-validator.js +0 -307
- package/esm/validators/number-validator.js.map +0 -1
- package/esm/validators/numeric-validator.d.ts +0 -15
- package/esm/validators/numeric-validator.d.ts.map +0 -1
- package/esm/validators/numeric-validator.js +0 -18
- package/esm/validators/numeric-validator.js.map +0 -1
- package/esm/validators/object-validator.d.ts +0 -233
- package/esm/validators/object-validator.d.ts.map +0 -1
- package/esm/validators/object-validator.js +0 -517
- package/esm/validators/object-validator.js.map +0 -1
- package/esm/validators/primitive-validator.d.ts +0 -70
- package/esm/validators/primitive-validator.d.ts.map +0 -1
- package/esm/validators/primitive-validator.js +0 -80
- package/esm/validators/primitive-validator.js.map +0 -1
- package/esm/validators/record-validator.d.ts +0 -54
- package/esm/validators/record-validator.d.ts.map +0 -1
- package/esm/validators/record-validator.js +0 -100
- package/esm/validators/record-validator.js.map +0 -1
- package/esm/validators/scalar-validator.d.ts +0 -93
- package/esm/validators/scalar-validator.d.ts.map +0 -1
- package/esm/validators/scalar-validator.js +0 -149
- package/esm/validators/scalar-validator.js.map +0 -1
- package/esm/validators/string-validator.d.ts +0 -189
- package/esm/validators/string-validator.d.ts.map +0 -1
- package/esm/validators/string-validator.js +0 -387
- package/esm/validators/string-validator.js.map +0 -1
- package/esm/validators/tuple-validator.d.ts +0 -56
- package/esm/validators/tuple-validator.d.ts.map +0 -1
- package/esm/validators/tuple-validator.js +0 -121
- package/esm/validators/tuple-validator.js.map +0 -1
- package/esm/validators/union-validator.d.ts +0 -55
- package/esm/validators/union-validator.d.ts.map +0 -1
- package/esm/validators/union-validator.js +0 -60
- package/esm/validators/union-validator.js.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../@warlock.js/seal/src/rules/conditional/required-with-rules.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Required with rule - field is required if another field is present
|
|
6
|
+
* Supports both global and sibling scope
|
|
7
|
+
*/
|
|
8
|
+
declare const requiredWithRule: SchemaRule<{
|
|
9
|
+
field: string;
|
|
10
|
+
scope?: "global" | "sibling";
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Required with all rule - field is required if all specified fields are present
|
|
14
|
+
* Supports both global and sibling scope
|
|
15
|
+
*/
|
|
16
|
+
declare const requiredWithAllRule: SchemaRule<{
|
|
17
|
+
fields: string[];
|
|
18
|
+
scope?: "global" | "sibling";
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Required with any rule - field is required if any of the specified fields is present
|
|
22
|
+
* Supports both global and sibling scope
|
|
23
|
+
*/
|
|
24
|
+
declare const requiredWithAnyRule: SchemaRule<{
|
|
25
|
+
fields: string[];
|
|
26
|
+
scope?: "global" | "sibling";
|
|
27
|
+
}>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { requiredWithAllRule, requiredWithAnyRule, requiredWithRule };
|
|
30
|
+
//# sourceMappingURL=required-with-rules.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required-with-rules.d.mts","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/conditional/required-with-rules.ts"],"mappings":";;;;;AASA;;cAAa,gBAAA,EAAkB,UAAU;EACvC,KAAA;EACA,KAAA;AAAA;;;AAAK;AAwBP;cAAa,mBAAA,EAAqB,UAAU;EAC1C,MAAA;EACA,KAAA;AAAA;;;;AAAK;cA2BM,mBAAA,EAAqB,UAAU;EAC1C,MAAA;EACA,KAAA;AAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { getFieldValue } from "../../helpers/get-field-value.mjs";
|
|
2
|
+
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
3
|
+
import "../../helpers/index.mjs";
|
|
4
|
+
import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
|
|
5
|
+
import { get } from "@mongez/reinforcements";
|
|
6
|
+
|
|
7
|
+
//#region ../../@warlock.js/seal/src/rules/conditional/required-with-rules.ts
|
|
8
|
+
/**
|
|
9
|
+
* Required with rule - field is required if another field is present
|
|
10
|
+
* Supports both global and sibling scope
|
|
11
|
+
*/
|
|
12
|
+
const requiredWithRule = {
|
|
13
|
+
name: "requiredWith",
|
|
14
|
+
description: "The field is required if another field is present",
|
|
15
|
+
sortOrder: -2,
|
|
16
|
+
requiresValue: false,
|
|
17
|
+
defaultErrorMessage: "The :input is required",
|
|
18
|
+
async validate(value, context) {
|
|
19
|
+
const fieldValue = getFieldValue(this, context);
|
|
20
|
+
if (isEmptyValue(value) && fieldValue !== void 0) {
|
|
21
|
+
this.context.translatableParams.field = this.context.options.field;
|
|
22
|
+
return invalidRule(this, context);
|
|
23
|
+
}
|
|
24
|
+
return VALID_RULE;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Required with all rule - field is required if all specified fields are present
|
|
29
|
+
* Supports both global and sibling scope
|
|
30
|
+
*/
|
|
31
|
+
const requiredWithAllRule = {
|
|
32
|
+
name: "requiredWithAll",
|
|
33
|
+
description: "The field is required if all specified fields are present",
|
|
34
|
+
sortOrder: -2,
|
|
35
|
+
requiresValue: false,
|
|
36
|
+
defaultErrorMessage: "The :input is required",
|
|
37
|
+
async validate(value, context) {
|
|
38
|
+
const { fields, scope = "global" } = this.context.options;
|
|
39
|
+
const source = scope === "sibling" ? context.parent : context.allValues;
|
|
40
|
+
const allPresent = fields.every((field) => get(source, field) !== void 0);
|
|
41
|
+
if (isEmptyValue(value) && allPresent) return invalidRule(this, context);
|
|
42
|
+
return VALID_RULE;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Required with any rule - field is required if any of the specified fields is present
|
|
47
|
+
* Supports both global and sibling scope
|
|
48
|
+
*/
|
|
49
|
+
const requiredWithAnyRule = {
|
|
50
|
+
name: "requiredWithAny",
|
|
51
|
+
description: "The field is required if any of the specified fields is present",
|
|
52
|
+
sortOrder: -2,
|
|
53
|
+
requiresValue: false,
|
|
54
|
+
defaultErrorMessage: "The :input is required",
|
|
55
|
+
async validate(value, context) {
|
|
56
|
+
const { fields, scope = "global" } = this.context.options;
|
|
57
|
+
const source = scope === "sibling" ? context.parent : context.allValues;
|
|
58
|
+
const anyPresent = fields.some((field) => get(source, field) !== void 0);
|
|
59
|
+
if (isEmptyValue(value) && anyPresent) return invalidRule(this, context);
|
|
60
|
+
return VALID_RULE;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
export { requiredWithAllRule, requiredWithAnyRule, requiredWithRule };
|
|
66
|
+
//# sourceMappingURL=required-with-rules.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required-with-rules.mjs","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/conditional/required-with-rules.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\r\nimport { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\r\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\r\nimport type { SchemaRule } from \"../../types\";\r\n\r\n/**\r\n * Required with rule - field is required if another field is present\r\n * Supports both global and sibling scope\r\n */\r\nexport const requiredWithRule: SchemaRule<{\r\n field: string;\r\n scope?: \"global\" | \"sibling\";\r\n}> = {\r\n name: \"requiredWith\",\r\n description: \"The field is required if another field is present\",\r\n sortOrder: -2,\r\n requiresValue: false,\r\n defaultErrorMessage: \"The :input is required\",\r\n async validate(value: any, context) {\r\n const fieldValue = getFieldValue(this, context);\r\n\r\n // Field is required if the other field is present\r\n if (isEmptyValue(value) && fieldValue !== undefined) {\r\n this.context.translatableParams.field = this.context.options.field;\r\n return invalidRule(this, context);\r\n }\r\n\r\n return VALID_RULE;\r\n },\r\n};\r\n\r\n/**\r\n * Required with all rule - field is required if all specified fields are present\r\n * Supports both global and sibling scope\r\n */\r\nexport const requiredWithAllRule: SchemaRule<{\r\n fields: string[];\r\n scope?: \"global\" | \"sibling\";\r\n}> = {\r\n name: \"requiredWithAll\",\r\n description: \"The field is required if all specified fields are present\",\r\n sortOrder: -2,\r\n requiresValue: false,\r\n defaultErrorMessage: \"The :input is required\",\r\n async validate(value: any, context) {\r\n const { fields, scope = \"global\" } = this.context.options;\r\n const source = scope === \"sibling\" ? context.parent : context.allValues;\r\n\r\n // Check if all fields are present\r\n const allPresent = fields.every((field) => get(source, field) !== undefined);\r\n\r\n // Field is required if all other fields are present\r\n if (isEmptyValue(value) && allPresent) {\r\n return invalidRule(this, context);\r\n }\r\n\r\n return VALID_RULE;\r\n },\r\n};\r\n\r\n/**\r\n * Required with any rule - field is required if any of the specified fields is present\r\n * Supports both global and sibling scope\r\n */\r\nexport const requiredWithAnyRule: SchemaRule<{\r\n fields: string[];\r\n scope?: \"global\" | \"sibling\";\r\n}> = {\r\n name: \"requiredWithAny\",\r\n description: \"The field is required if any of the specified fields is present\",\r\n sortOrder: -2,\r\n requiresValue: false,\r\n defaultErrorMessage: \"The :input is required\",\r\n async validate(value: any, context) {\r\n const { fields, scope = \"global\" } = this.context.options;\r\n const source = scope === \"sibling\" ? context.parent : context.allValues;\r\n\r\n // Check if any field is present\r\n const anyPresent = fields.some((field) => get(source, field) !== undefined);\r\n\r\n // Field is required if any other field is present\r\n if (isEmptyValue(value) && anyPresent) {\r\n return invalidRule(this, context);\r\n }\r\n\r\n return VALID_RULE;\r\n },\r\n};\r\n"],"mappings":";;;;;;;;;;;AASA,MAAa,mBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,aAAa,KAAK,KAAK,eAAe,QAAW;GACnD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,sBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,OAAO,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG3E,IAAI,aAAa,KAAK,KAAK,YACzB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;;AAMA,MAAa,sBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,MAAM,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG1E,IAAI,aAAa,KAAK,KAAK,YACzB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../@warlock.js/seal/src/rules/conditional/required-without-rules.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Required without rule - field is required if another field is missing
|
|
6
|
+
* Supports both global and sibling scope
|
|
7
|
+
*/
|
|
8
|
+
declare const requiredWithoutRule: SchemaRule<{
|
|
9
|
+
field: string;
|
|
10
|
+
scope?: "global" | "sibling";
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Required without all rule - field is required if all specified fields are missing
|
|
14
|
+
* Supports both global and sibling scope
|
|
15
|
+
*/
|
|
16
|
+
declare const requiredWithoutAllRule: SchemaRule<{
|
|
17
|
+
fields: string[];
|
|
18
|
+
scope?: "global" | "sibling";
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Required without any rule - field is required if any of the specified fields is missing
|
|
22
|
+
* Supports both global and sibling scope
|
|
23
|
+
*/
|
|
24
|
+
declare const requiredWithoutAnyRule: SchemaRule<{
|
|
25
|
+
fields: string[];
|
|
26
|
+
scope?: "global" | "sibling";
|
|
27
|
+
}>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule };
|
|
30
|
+
//# sourceMappingURL=required-without-rules.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required-without-rules.d.mts","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/conditional/required-without-rules.ts"],"mappings":";;;;;AASA;;cAAa,mBAAA,EAAqB,UAAU;EAC1C,KAAA;EACA,KAAA;AAAA;;;AAAK;AAwBP;cAAa,sBAAA,EAAwB,UAAU;EAC7C,MAAA;EACA,KAAA;AAAA;;;;AAAK;cA2BM,sBAAA,EAAwB,UAAU;EAC7C,MAAA;EACA,KAAA;AAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { getFieldValue } from "../../helpers/get-field-value.mjs";
|
|
2
|
+
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
3
|
+
import "../../helpers/index.mjs";
|
|
4
|
+
import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
|
|
5
|
+
import { get } from "@mongez/reinforcements";
|
|
6
|
+
|
|
7
|
+
//#region ../../@warlock.js/seal/src/rules/conditional/required-without-rules.ts
|
|
8
|
+
/**
|
|
9
|
+
* Required without rule - field is required if another field is missing
|
|
10
|
+
* Supports both global and sibling scope
|
|
11
|
+
*/
|
|
12
|
+
const requiredWithoutRule = {
|
|
13
|
+
name: "requiredWithout",
|
|
14
|
+
description: "The field is required if another field is missing",
|
|
15
|
+
sortOrder: -2,
|
|
16
|
+
requiresValue: false,
|
|
17
|
+
defaultErrorMessage: "The :input is required",
|
|
18
|
+
async validate(value, context) {
|
|
19
|
+
const fieldValue = getFieldValue(this, context);
|
|
20
|
+
if (isEmptyValue(value) && fieldValue === void 0) {
|
|
21
|
+
this.context.translatableParams.field = this.context.options.field;
|
|
22
|
+
return invalidRule(this, context);
|
|
23
|
+
}
|
|
24
|
+
return VALID_RULE;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Required without all rule - field is required if all specified fields are missing
|
|
29
|
+
* Supports both global and sibling scope
|
|
30
|
+
*/
|
|
31
|
+
const requiredWithoutAllRule = {
|
|
32
|
+
name: "requiredWithoutAll",
|
|
33
|
+
description: "The field is required if all specified fields are missing",
|
|
34
|
+
sortOrder: -2,
|
|
35
|
+
requiresValue: false,
|
|
36
|
+
defaultErrorMessage: "The :input is required",
|
|
37
|
+
async validate(value, context) {
|
|
38
|
+
const { fields, scope = "global" } = this.context.options;
|
|
39
|
+
const source = scope === "sibling" ? context.parent : context.allValues;
|
|
40
|
+
const allMissing = fields.every((field) => get(source, field) === void 0);
|
|
41
|
+
if (isEmptyValue(value) && allMissing) return invalidRule(this, context);
|
|
42
|
+
return VALID_RULE;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Required without any rule - field is required if any of the specified fields is missing
|
|
47
|
+
* Supports both global and sibling scope
|
|
48
|
+
*/
|
|
49
|
+
const requiredWithoutAnyRule = {
|
|
50
|
+
name: "requiredWithoutAny",
|
|
51
|
+
description: "The field is required if any of the specified fields is missing",
|
|
52
|
+
sortOrder: -2,
|
|
53
|
+
requiresValue: false,
|
|
54
|
+
defaultErrorMessage: "The :input is required",
|
|
55
|
+
async validate(value, context) {
|
|
56
|
+
const { fields, scope = "global" } = this.context.options;
|
|
57
|
+
const source = scope === "sibling" ? context.parent : context.allValues;
|
|
58
|
+
const anyMissing = fields.some((field) => get(source, field) === void 0);
|
|
59
|
+
if (isEmptyValue(value) && anyMissing) return invalidRule(this, context);
|
|
60
|
+
return VALID_RULE;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
export { requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule };
|
|
66
|
+
//# sourceMappingURL=required-without-rules.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required-without-rules.mjs","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/conditional/required-without-rules.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\r\nimport { getFieldValue, invalidRule, VALID_RULE } from \"../../helpers\";\r\nimport type { SchemaRule } from \"../../types\";\r\nimport { isEmptyValue } from \"./../../helpers/is-empty-value\";\r\n\r\n/**\r\n * Required without rule - field is required if another field is missing\r\n * Supports both global and sibling scope\r\n */\r\nexport const requiredWithoutRule: SchemaRule<{\r\n field: string;\r\n scope?: \"global\" | \"sibling\";\r\n}> = {\r\n name: \"requiredWithout\",\r\n description: \"The field is required if another field is missing\",\r\n sortOrder: -2,\r\n requiresValue: false,\r\n defaultErrorMessage: \"The :input is required\",\r\n async validate(value: any, context) {\r\n const fieldValue = getFieldValue(this, context);\r\n\r\n // Field is required if the other field is missing\r\n if (isEmptyValue(value) && fieldValue === undefined) {\r\n this.context.translatableParams.field = this.context.options.field;\r\n return invalidRule(this, context);\r\n }\r\n\r\n return VALID_RULE;\r\n },\r\n};\r\n\r\n/**\r\n * Required without all rule - field is required if all specified fields are missing\r\n * Supports both global and sibling scope\r\n */\r\nexport const requiredWithoutAllRule: SchemaRule<{\r\n fields: string[];\r\n scope?: \"global\" | \"sibling\";\r\n}> = {\r\n name: \"requiredWithoutAll\",\r\n description: \"The field is required if all specified fields are missing\",\r\n sortOrder: -2,\r\n requiresValue: false,\r\n defaultErrorMessage: \"The :input is required\",\r\n async validate(value: any, context) {\r\n const { fields, scope = \"global\" } = this.context.options;\r\n const source = scope === \"sibling\" ? context.parent : context.allValues;\r\n\r\n // Check if all fields are missing\r\n const allMissing = fields.every((field) => get(source, field) === undefined);\r\n\r\n // Field is required if all other fields are missing\r\n if (isEmptyValue(value) && allMissing) {\r\n return invalidRule(this, context);\r\n }\r\n\r\n return VALID_RULE;\r\n },\r\n};\r\n\r\n/**\r\n * Required without any rule - field is required if any of the specified fields is missing\r\n * Supports both global and sibling scope\r\n */\r\nexport const requiredWithoutAnyRule: SchemaRule<{\r\n fields: string[];\r\n scope?: \"global\" | \"sibling\";\r\n}> = {\r\n name: \"requiredWithoutAny\",\r\n description: \"The field is required if any of the specified fields is missing\",\r\n sortOrder: -2,\r\n requiresValue: false,\r\n defaultErrorMessage: \"The :input is required\",\r\n async validate(value: any, context) {\r\n const { fields, scope = \"global\" } = this.context.options;\r\n const source = scope === \"sibling\" ? context.parent : context.allValues;\r\n\r\n // Check if any field is missing\r\n const anyMissing = fields.some((field) => get(source, field) === undefined);\r\n\r\n // Field is required if any other field is missing\r\n if (isEmptyValue(value) && anyMissing) {\r\n return invalidRule(this, context);\r\n }\r\n\r\n return VALID_RULE;\r\n },\r\n};\r\n"],"mappings":";;;;;;;;;;;AASA,MAAa,sBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,cAAc,MAAM,OAAO;EAG9C,IAAI,aAAa,KAAK,KAAK,eAAe,QAAW;GACnD,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF;;;;;AAMA,MAAa,yBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,OAAO,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG3E,IAAI,aAAa,KAAK,KAAK,YACzB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF;;;;;AAMA,MAAa,yBAGR;CACH,MAAM;CACN,aAAa;CACb,WAAW;CACX,eAAe;CACf,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,EAAE,QAAQ,QAAQ,aAAa,KAAK,QAAQ;EAClD,MAAM,SAAS,UAAU,YAAY,QAAQ,SAAS,QAAQ;EAG9D,MAAM,aAAa,OAAO,MAAM,UAAU,IAAI,QAAQ,KAAK,MAAM,MAAS;EAG1E,IAAI,aAAa,KAAK,KAAK,YACzB,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../@warlock.js/seal/src/rules/core/equal.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Equal rule - value must be equal to a specific value
|
|
6
|
+
*/
|
|
7
|
+
declare const equalRule: SchemaRule<{
|
|
8
|
+
value: any;
|
|
9
|
+
}>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { equalRule };
|
|
12
|
+
//# sourceMappingURL=equal.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equal.d.mts","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/core/equal.ts"],"mappings":";;;;;AAMA;cAAa,SAAA,EAAW,UAAU;EAAG,KAAK;AAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
|
+
import "../../helpers/index.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../@warlock.js/seal/src/rules/core/equal.ts
|
|
5
|
+
/**
|
|
6
|
+
* Equal rule - value must be equal to a specific value
|
|
7
|
+
*/
|
|
8
|
+
const equalRule = {
|
|
9
|
+
name: "equal",
|
|
10
|
+
defaultErrorMessage: "The :input must be equal to :value",
|
|
11
|
+
async validate(value, context) {
|
|
12
|
+
if (value !== this.context.options.value) {
|
|
13
|
+
this.context.translatableParams.value = this.context.options.value;
|
|
14
|
+
return invalidRule(this, context);
|
|
15
|
+
}
|
|
16
|
+
return VALID_RULE;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { equalRule };
|
|
22
|
+
//# sourceMappingURL=equal.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equal.mjs","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/core/equal.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\r\nimport type { SchemaRule } from \"../../types\";\r\n\r\n/**\r\n * Equal rule - value must be equal to a specific value\r\n */\r\nexport const equalRule: SchemaRule<{ value: any }> = {\r\n name: \"equal\",\r\n defaultErrorMessage: \"The :input must be equal to :value\",\r\n async validate(value: any, context) {\r\n if (value !== this.context.options.value) {\r\n this.context.translatableParams.value = this.context.options.value;\r\n return invalidRule(this, context);\r\n }\r\n return VALID_RULE;\r\n },\r\n};\r\n"],"mappings":";;;;;;;AAMA,MAAa,YAAwC;CACnD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,UAAU,KAAK,QAAQ,QAAQ,OAAO;GACxC,KAAK,QAAQ,mBAAmB,QAAQ,KAAK,QAAQ,QAAQ;GAC7D,OAAO,YAAY,MAAM,OAAO;EAClC;EACA,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../@warlock.js/seal/src/rules/core/forbidden.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Forbidden rule - value must not be present
|
|
6
|
+
*/
|
|
7
|
+
declare const forbiddenRule: SchemaRule;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { forbiddenRule };
|
|
10
|
+
//# sourceMappingURL=forbidden.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forbidden.d.mts","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/core/forbidden.ts"],"mappings":";;;;;AAOA;cAAa,aAAA,EAAe,UAS3B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
|
+
import "../../helpers/index.mjs";
|
|
3
|
+
import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
|
|
4
|
+
|
|
5
|
+
//#region ../../@warlock.js/seal/src/rules/core/forbidden.ts
|
|
6
|
+
/**
|
|
7
|
+
* Forbidden rule - value must not be present
|
|
8
|
+
*/
|
|
9
|
+
const forbiddenRule = {
|
|
10
|
+
name: "forbidden",
|
|
11
|
+
defaultErrorMessage: "The :input is forbidden",
|
|
12
|
+
async validate(value, context) {
|
|
13
|
+
if (!isEmptyValue(value)) return invalidRule(this, context);
|
|
14
|
+
return VALID_RULE;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { forbiddenRule };
|
|
20
|
+
//# sourceMappingURL=forbidden.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forbidden.mjs","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/core/forbidden.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\r\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\r\nimport type { SchemaRule } from \"../../types\";\r\n\r\n/**\r\n * Forbidden rule - value must not be present\r\n */\r\nexport const forbiddenRule: SchemaRule = {\r\n name: \"forbidden\",\r\n defaultErrorMessage: \"The :input is forbidden\",\r\n async validate(value: any, context) {\r\n if (!isEmptyValue(value)) {\r\n return invalidRule(this, context);\r\n }\r\n return VALID_RULE;\r\n },\r\n};\r\n"],"mappings":";;;;;;;;AAOA,MAAa,gBAA4B;CACvC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,CAAC,aAAa,KAAK,GACrB,OAAO,YAAY,MAAM,OAAO;EAElC,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../@warlock.js/seal/src/rules/core/required.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Required rule - value must be present and not empty
|
|
6
|
+
*/
|
|
7
|
+
declare const requiredRule: SchemaRule;
|
|
8
|
+
/**
|
|
9
|
+
* Present rule - key must exist in the data, but value can be anything
|
|
10
|
+
* (empty string, null are all valid as long as the key exists)
|
|
11
|
+
*/
|
|
12
|
+
declare const presentRule: SchemaRule;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { presentRule, requiredRule };
|
|
15
|
+
//# sourceMappingURL=required.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required.d.mts","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/core/required.ts"],"mappings":";;;;;AAOA;cAAa,YAAA,EAAc,UAW1B;;;AAAA;AAMD;cAAa,WAAA,EAAa,UAYzB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
|
+
import "../../helpers/index.mjs";
|
|
3
|
+
import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
|
|
4
|
+
|
|
5
|
+
//#region ../../@warlock.js/seal/src/rules/core/required.ts
|
|
6
|
+
/**
|
|
7
|
+
* Required rule - value must be present and not empty
|
|
8
|
+
*/
|
|
9
|
+
const requiredRule = {
|
|
10
|
+
name: "required",
|
|
11
|
+
defaultErrorMessage: "The :input is required",
|
|
12
|
+
requiresValue: false,
|
|
13
|
+
sortOrder: -2,
|
|
14
|
+
async validate(value, context) {
|
|
15
|
+
if (isEmptyValue(value)) return invalidRule(this, context);
|
|
16
|
+
return VALID_RULE;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Present rule - key must exist in the data, but value can be anything
|
|
21
|
+
* (empty string, null are all valid as long as the key exists)
|
|
22
|
+
*/
|
|
23
|
+
const presentRule = {
|
|
24
|
+
name: "present",
|
|
25
|
+
defaultErrorMessage: "The :input field is required",
|
|
26
|
+
requiresValue: false,
|
|
27
|
+
sortOrder: -2,
|
|
28
|
+
async validate(value, context) {
|
|
29
|
+
if (value === void 0) return invalidRule(this, context);
|
|
30
|
+
return VALID_RULE;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { presentRule, requiredRule };
|
|
36
|
+
//# sourceMappingURL=required.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required.mjs","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/core/required.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\r\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\r\nimport type { SchemaRule } from \"../../types\";\r\n\r\n/**\r\n * Required rule - value must be present and not empty\r\n */\r\nexport const requiredRule: SchemaRule = {\r\n name: \"required\",\r\n defaultErrorMessage: \"The :input is required\",\r\n requiresValue: false,\r\n sortOrder: -2,\r\n async validate(value: any, context) {\r\n if (isEmptyValue(value)) {\r\n return invalidRule(this, context);\r\n }\r\n return VALID_RULE;\r\n },\r\n};\r\n\r\n/**\r\n * Present rule - key must exist in the data, but value can be anything\r\n * (empty string, null are all valid as long as the key exists)\r\n */\r\nexport const presentRule: SchemaRule = {\r\n name: \"present\",\r\n defaultErrorMessage: \"The :input field is required\",\r\n requiresValue: false,\r\n sortOrder: -2,\r\n async validate(value: any, context) {\r\n if (value === undefined) {\r\n return invalidRule(this, context);\r\n }\r\n\r\n return VALID_RULE;\r\n },\r\n};\r\n"],"mappings":";;;;;;;;AAOA,MAAa,eAA2B;CACtC,MAAM;CACN,qBAAqB;CACrB,eAAe;CACf,WAAW;CACX,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,aAAa,KAAK,GACpB,OAAO,YAAY,MAAM,OAAO;EAElC,OAAO;CACT;AACF;;;;;AAMA,MAAa,cAA0B;CACrC,MAAM;CACN,qBAAqB;CACrB,eAAe;CACf,WAAW;CACX,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,UAAU,QACZ,OAAO,YAAY,MAAM,OAAO;EAGlC,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
+
import { BaseValidator } from "../../validators/base-validator.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../@warlock.js/seal/src/rules/core/union.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Union rule - value must match at least one of the provided validators
|
|
7
|
+
*/
|
|
8
|
+
declare const unionRule: SchemaRule<{
|
|
9
|
+
validators: BaseValidator[];
|
|
10
|
+
}>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { unionRule };
|
|
13
|
+
//# sourceMappingURL=union.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"union.d.mts","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/core/union.ts"],"mappings":";;;;;;AAOA;cAAa,SAAA,EAAW,UAAU;EAAG,UAAA,EAAY,aAAA;AAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
|
+
import "../../helpers/index.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../@warlock.js/seal/src/rules/core/union.ts
|
|
5
|
+
/**
|
|
6
|
+
* Union rule - value must match at least one of the provided validators
|
|
7
|
+
*/
|
|
8
|
+
const unionRule = {
|
|
9
|
+
name: "union",
|
|
10
|
+
defaultErrorMessage: "Value must match one of the allowed types",
|
|
11
|
+
async validate(value, context) {
|
|
12
|
+
const validators = this.context.options.validators;
|
|
13
|
+
const firstErrorOnly = context.configurations?.firstErrorOnly ?? true;
|
|
14
|
+
const allErrors = [];
|
|
15
|
+
for (const validator of validators) {
|
|
16
|
+
if (!validator.matchesType(value)) continue;
|
|
17
|
+
const result = await validator.validate(value, context);
|
|
18
|
+
if (result.isValid) return VALID_RULE;
|
|
19
|
+
const errorMsg = result.errors?.[0]?.error || "Validation failed";
|
|
20
|
+
allErrors.push(errorMsg);
|
|
21
|
+
if (firstErrorOnly) break;
|
|
22
|
+
}
|
|
23
|
+
if (allErrors.length > 0) this.context.errorMessage = firstErrorOnly ? allErrors[0] : allErrors.join("; ");
|
|
24
|
+
return invalidRule(this, context);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
export { unionRule };
|
|
30
|
+
//# sourceMappingURL=union.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"union.mjs","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/core/union.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\r\nimport type { SchemaRule } from \"../../types\";\r\nimport type { BaseValidator } from \"../../validators/base-validator\";\r\n\r\n/**\r\n * Union rule - value must match at least one of the provided validators\r\n */\r\nexport const unionRule: SchemaRule<{ validators: BaseValidator[] }> = {\r\n name: \"union\",\r\n defaultErrorMessage: \"Value must match one of the allowed types\",\r\n async validate(value: any, context) {\r\n const validators = this.context.options.validators;\r\n const firstErrorOnly = context.configurations?.firstErrorOnly ?? true;\r\n const allErrors: string[] = [];\r\n\r\n // Try each validator\r\n for (const validator of validators) {\r\n // Skip if type doesn't match (optimization)\r\n if (!validator.matchesType(value)) {\r\n continue;\r\n }\r\n\r\n // Type matches - validate\r\n const result = await validator.validate(value, context);\r\n\r\n if (result.isValid) {\r\n // Success! Validator matched and validated\r\n return VALID_RULE;\r\n }\r\n\r\n // Failed - collect error message\r\n const errorMsg = result.errors?.[0]?.error || \"Validation failed\";\r\n allErrors.push(errorMsg);\r\n\r\n // If firstErrorOnly, stop after first failed validator\r\n if (firstErrorOnly) {\r\n break;\r\n }\r\n }\r\n\r\n // All failed or no validator matched the type\r\n if (allErrors.length > 0) {\r\n // At least one validator matched type but failed validation\r\n this.context.errorMessage = firstErrorOnly\r\n ? allErrors[0]\r\n : allErrors.join(\"; \");\r\n }\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n"],"mappings":";;;;;;;AAOA,MAAa,YAAyD;CACpE,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,aAAa,KAAK,QAAQ,QAAQ;EACxC,MAAM,iBAAiB,QAAQ,gBAAgB,kBAAkB;EACjE,MAAM,YAAsB,CAAC;EAG7B,KAAK,MAAM,aAAa,YAAY;GAElC,IAAI,CAAC,UAAU,YAAY,KAAK,GAC9B;GAIF,MAAM,SAAS,MAAM,UAAU,SAAS,OAAO,OAAO;GAEtD,IAAI,OAAO,SAET,OAAO;GAIT,MAAM,WAAW,OAAO,SAAS,IAAI,SAAS;GAC9C,UAAU,KAAK,QAAQ;GAGvB,IAAI,gBACF;EAEJ;EAGA,IAAI,UAAU,SAAS,GAErB,KAAK,QAAQ,eAAe,iBACxB,UAAU,KACV,UAAU,KAAK,IAAI;EAGzB,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
+
import { WhenRuleOptions } from "../../types/conditional-types.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../@warlock.js/seal/src/rules/core/when.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* When rule - conditional validation based on another field value
|
|
7
|
+
*/
|
|
8
|
+
declare const whenRule: SchemaRule<WhenRuleOptions>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { whenRule };
|
|
11
|
+
//# sourceMappingURL=when.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"when.d.mts","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/core/when.ts"],"mappings":";;;;;;;cAOa,QAAA,EAAU,UAAU,CAAC,eAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
|
+
import "../../helpers/index.mjs";
|
|
3
|
+
import { get } from "@mongez/reinforcements";
|
|
4
|
+
|
|
5
|
+
//#region ../../@warlock.js/seal/src/rules/core/when.ts
|
|
6
|
+
/**
|
|
7
|
+
* When rule - conditional validation based on another field value
|
|
8
|
+
*/
|
|
9
|
+
const whenRule = {
|
|
10
|
+
name: "when",
|
|
11
|
+
description: "Apply conditional validation based on another field value",
|
|
12
|
+
async validate(value, context) {
|
|
13
|
+
const fieldToCheck = this.context.options.field;
|
|
14
|
+
const conditions = this.context.options.is;
|
|
15
|
+
const otherwise = this.context.options.otherwise;
|
|
16
|
+
const fieldValue = (this.context.options.scope || "global") === "global" ? get(context.allValues, fieldToCheck) : get(context.parent, fieldToCheck);
|
|
17
|
+
const fieldValueKey = String(fieldValue);
|
|
18
|
+
if (conditions[fieldValueKey]) {
|
|
19
|
+
const result = await conditions[fieldValueKey].validate(value, context);
|
|
20
|
+
if (result.isValid) return VALID_RULE;
|
|
21
|
+
this.context.errorMessage = result.errors?.[0]?.error || "Validation failed";
|
|
22
|
+
return invalidRule(this, context);
|
|
23
|
+
}
|
|
24
|
+
if (otherwise) {
|
|
25
|
+
const result = await otherwise.validate(value, context);
|
|
26
|
+
if (result.isValid) return VALID_RULE;
|
|
27
|
+
this.context.errorMessage = result.errors?.[0]?.error || "Validation failed";
|
|
28
|
+
return invalidRule(this, context);
|
|
29
|
+
}
|
|
30
|
+
return VALID_RULE;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { whenRule };
|
|
36
|
+
//# sourceMappingURL=when.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"when.mjs","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/core/when.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\r\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\r\nimport type { SchemaRule, WhenRuleOptions } from \"../../types\";\r\n\r\n/**\r\n * When rule - conditional validation based on another field value\r\n */\r\nexport const whenRule: SchemaRule<WhenRuleOptions> = {\r\n name: \"when\",\r\n description: \"Apply conditional validation based on another field value\",\r\n async validate(value: any, context) {\r\n const fieldToCheck = this.context.options.field;\r\n const conditions = this.context.options.is;\r\n const otherwise = this.context.options.otherwise;\r\n const scope = this.context.options.scope || \"global\";\r\n\r\n const fieldValue =\r\n scope === \"global\"\r\n ? get(context.allValues, fieldToCheck)\r\n : get(context.parent, fieldToCheck);\r\n\r\n // Convert field value to string for key lookup\r\n // This handles boolean, number, and string field values\r\n const fieldValueKey = String(fieldValue);\r\n\r\n if (conditions[fieldValueKey]) {\r\n const result = await conditions[fieldValueKey].validate(value, context);\r\n if (result.isValid) {\r\n return VALID_RULE;\r\n }\r\n\r\n // Safe error access\r\n this.context.errorMessage =\r\n result.errors?.[0]?.error || \"Validation failed\";\r\n return invalidRule(this, context);\r\n }\r\n\r\n if (otherwise) {\r\n const result = await otherwise.validate(value, context);\r\n\r\n if (result.isValid) {\r\n return VALID_RULE;\r\n }\r\n\r\n // Safe error access\r\n this.context.errorMessage =\r\n result.errors?.[0]?.error || \"Validation failed\";\r\n return invalidRule(this, context);\r\n }\r\n\r\n return VALID_RULE;\r\n },\r\n};\r\n"],"mappings":";;;;;;;;AAOA,MAAa,WAAwC;CACnD,MAAM;CACN,aAAa;CACb,MAAM,SAAS,OAAY,SAAS;EAClC,MAAM,eAAe,KAAK,QAAQ,QAAQ;EAC1C,MAAM,aAAa,KAAK,QAAQ,QAAQ;EACxC,MAAM,YAAY,KAAK,QAAQ,QAAQ;EAGvC,MAAM,cAFQ,KAAK,QAAQ,QAAQ,SAAS,cAGhC,WACN,IAAI,QAAQ,WAAW,YAAY,IACnC,IAAI,QAAQ,QAAQ,YAAY;EAItC,MAAM,gBAAgB,OAAO,UAAU;EAEvC,IAAI,WAAW,gBAAgB;GAC7B,MAAM,SAAS,MAAM,WAAW,eAAe,SAAS,OAAO,OAAO;GACtE,IAAI,OAAO,SACT,OAAO;GAIT,KAAK,QAAQ,eACX,OAAO,SAAS,IAAI,SAAS;GAC/B,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,IAAI,WAAW;GACb,MAAM,SAAS,MAAM,UAAU,SAAS,OAAO,OAAO;GAEtD,IAAI,OAAO,SACT,OAAO;GAIT,KAAK,QAAQ,eACX,OAAO,SAAS,IAAI,SAAS;GAC/B,OAAO,YAAY,MAAM,OAAO;EAClC;EAEA,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../@warlock.js/seal/src/rules/date/date-comparison-rules.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Between dates rule - date must be between start and end dates
|
|
6
|
+
*/
|
|
7
|
+
declare const betweenDatesRule: SchemaRule<{
|
|
8
|
+
startDate: Date;
|
|
9
|
+
endDate: Date;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Today rule - date must be exactly today
|
|
13
|
+
*/
|
|
14
|
+
declare const todayRule: SchemaRule;
|
|
15
|
+
/**
|
|
16
|
+
* Past rule - date must be in the past
|
|
17
|
+
*/
|
|
18
|
+
declare const pastRule: SchemaRule;
|
|
19
|
+
/**
|
|
20
|
+
* Future rule - date must be in the future
|
|
21
|
+
*/
|
|
22
|
+
declare const futureRule: SchemaRule;
|
|
23
|
+
/**
|
|
24
|
+
* After today rule - date must be after today (not including today)
|
|
25
|
+
*/
|
|
26
|
+
declare const afterTodayRule: SchemaRule;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { afterTodayRule, betweenDatesRule, futureRule, pastRule, todayRule };
|
|
29
|
+
//# sourceMappingURL=date-comparison-rules.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-comparison-rules.d.mts","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/date/date-comparison-rules.ts"],"mappings":";;;;;AAMA;cAAa,gBAAA,EAAkB,UAAA;EAC7B,SAAA,EAAW,IAAA;EACX,OAAA,EAAS,IAAA;AAAA;;;;cAqBE,SAAA,EAAW,UAcvB;;;;cAKY,QAAA,EAAU,UAYtB;;AApDc;AAqBf;cAoCa,UAAA,EAAY,UAYxB;;;AAlCA;cAuCY,cAAA,EAAgB,UAc5B"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
|
+
import "../../helpers/index.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../@warlock.js/seal/src/rules/date/date-comparison-rules.ts
|
|
5
|
+
/**
|
|
6
|
+
* Between dates rule - date must be between start and end dates
|
|
7
|
+
*/
|
|
8
|
+
const betweenDatesRule = {
|
|
9
|
+
name: "betweenDates",
|
|
10
|
+
defaultErrorMessage: "The :input must be between :startDate and :endDate",
|
|
11
|
+
async validate(value, context) {
|
|
12
|
+
const { startDate, endDate } = this.context.options;
|
|
13
|
+
const inputDate = new Date(value);
|
|
14
|
+
if (inputDate >= startDate && inputDate <= endDate) {
|
|
15
|
+
this.context.translationParams.startDate = startDate.toISOString();
|
|
16
|
+
this.context.translationParams.endDate = endDate.toISOString();
|
|
17
|
+
return VALID_RULE;
|
|
18
|
+
}
|
|
19
|
+
return invalidRule(this, context);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Today rule - date must be exactly today
|
|
24
|
+
*/
|
|
25
|
+
const todayRule = {
|
|
26
|
+
name: "today",
|
|
27
|
+
defaultErrorMessage: "The :input must be today",
|
|
28
|
+
async validate(value, context) {
|
|
29
|
+
const today = /* @__PURE__ */ new Date();
|
|
30
|
+
today.setHours(0, 0, 0, 0);
|
|
31
|
+
const inputDate = new Date(value);
|
|
32
|
+
inputDate.setHours(0, 0, 0, 0);
|
|
33
|
+
if (inputDate.getTime() === today.getTime()) return VALID_RULE;
|
|
34
|
+
return invalidRule(this, context);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Past rule - date must be in the past
|
|
39
|
+
*/
|
|
40
|
+
const pastRule = {
|
|
41
|
+
name: "past",
|
|
42
|
+
defaultErrorMessage: "The :input must be in the past",
|
|
43
|
+
async validate(value, context) {
|
|
44
|
+
const now = /* @__PURE__ */ new Date();
|
|
45
|
+
if (new Date(value) < now) return VALID_RULE;
|
|
46
|
+
return invalidRule(this, context);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Future rule - date must be in the future
|
|
51
|
+
*/
|
|
52
|
+
const futureRule = {
|
|
53
|
+
name: "future",
|
|
54
|
+
defaultErrorMessage: "The :input must be in the future",
|
|
55
|
+
async validate(value, context) {
|
|
56
|
+
if (value > /* @__PURE__ */ new Date()) return VALID_RULE;
|
|
57
|
+
return invalidRule(this, context);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* After today rule - date must be after today (not including today)
|
|
62
|
+
*/
|
|
63
|
+
const afterTodayRule = {
|
|
64
|
+
name: "afterToday",
|
|
65
|
+
defaultErrorMessage: "The :input must be after today",
|
|
66
|
+
async validate(value, context) {
|
|
67
|
+
const today = /* @__PURE__ */ new Date();
|
|
68
|
+
today.setHours(0, 0, 0, 0);
|
|
69
|
+
const inputDate = new Date(value);
|
|
70
|
+
inputDate.setHours(0, 0, 0, 0);
|
|
71
|
+
if (inputDate > today) return VALID_RULE;
|
|
72
|
+
return invalidRule(this, context);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
//#endregion
|
|
77
|
+
export { afterTodayRule, betweenDatesRule, futureRule, pastRule, todayRule };
|
|
78
|
+
//# sourceMappingURL=date-comparison-rules.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-comparison-rules.mjs","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/date/date-comparison-rules.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\r\nimport type { SchemaRule } from \"../../types\";\r\n\r\n/**\r\n * Between dates rule - date must be between start and end dates\r\n */\r\nexport const betweenDatesRule: SchemaRule<{\r\n startDate: Date;\r\n endDate: Date;\r\n}> = {\r\n name: \"betweenDates\",\r\n defaultErrorMessage: \"The :input must be between :startDate and :endDate\",\r\n async validate(value: Date, context) {\r\n const { startDate, endDate } = this.context.options;\r\n const inputDate = new Date(value);\r\n\r\n if (inputDate >= startDate && inputDate <= endDate) {\r\n this.context.translationParams.startDate = startDate.toISOString();\r\n this.context.translationParams.endDate = endDate.toISOString();\r\n return VALID_RULE;\r\n }\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Today rule - date must be exactly today\r\n */\r\nexport const todayRule: SchemaRule = {\r\n name: \"today\",\r\n defaultErrorMessage: \"The :input must be today\",\r\n async validate(value: Date, context) {\r\n const today = new Date();\r\n today.setHours(0, 0, 0, 0);\r\n const inputDate = new Date(value);\r\n inputDate.setHours(0, 0, 0, 0);\r\n\r\n if (inputDate.getTime() === today.getTime()) {\r\n return VALID_RULE;\r\n }\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Past rule - date must be in the past\r\n */\r\nexport const pastRule: SchemaRule = {\r\n name: \"past\",\r\n defaultErrorMessage: \"The :input must be in the past\",\r\n async validate(value: Date, context) {\r\n const now = new Date();\r\n const inputDate = new Date(value);\r\n\r\n if (inputDate < now) {\r\n return VALID_RULE;\r\n }\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Future rule - date must be in the future\r\n */\r\nexport const futureRule: SchemaRule = {\r\n name: \"future\",\r\n defaultErrorMessage: \"The :input must be in the future\",\r\n async validate(value: Date, context) {\r\n const now = new Date();\r\n\r\n if (value > now) {\r\n return VALID_RULE;\r\n }\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * After today rule - date must be after today (not including today)\r\n */\r\nexport const afterTodayRule: SchemaRule = {\r\n name: \"afterToday\",\r\n defaultErrorMessage: \"The :input must be after today\",\r\n async validate(value: Date, context) {\r\n const today = new Date();\r\n today.setHours(0, 0, 0, 0);\r\n const inputDate = new Date(value);\r\n inputDate.setHours(0, 0, 0, 0);\r\n\r\n if (inputDate > today) {\r\n return VALID_RULE;\r\n }\r\n return invalidRule(this, context);\r\n },\r\n};\r\n"],"mappings":";;;;;;;AAMA,MAAa,mBAGR;CACH,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,EAAE,WAAW,YAAY,KAAK,QAAQ;EAC5C,MAAM,YAAY,IAAI,KAAK,KAAK;EAEhC,IAAI,aAAa,aAAa,aAAa,SAAS;GAClD,KAAK,QAAQ,kBAAkB,YAAY,UAAU,YAAY;GACjE,KAAK,QAAQ,kBAAkB,UAAU,QAAQ,YAAY;GAC7D,OAAO;EACT;EAEA,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,YAAwB;CACnC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,wBAAQ,IAAI,KAAK;EACvB,MAAM,SAAS,GAAG,GAAG,GAAG,CAAC;EACzB,MAAM,YAAY,IAAI,KAAK,KAAK;EAChC,UAAU,SAAS,GAAG,GAAG,GAAG,CAAC;EAE7B,IAAI,UAAU,QAAQ,MAAM,MAAM,QAAQ,GACxC,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,WAAuB;CAClC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,sBAAM,IAAI,KAAK;EAGrB,IAAI,IAFkB,KAAK,KAEf,IAAI,KACd,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,aAAyB;CACpC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAGnC,IAAI,wBAAQ,IAFI,KAEF,GACZ,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,iBAA6B;CACxC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,wBAAQ,IAAI,KAAK;EACvB,MAAM,SAAS,GAAG,GAAG,GAAG,CAAC;EACzB,MAAM,YAAY,IAAI,KAAK,KAAK;EAChC,UAAU,SAAS,GAAG,GAAG,GAAG,CAAC;EAE7B,IAAI,YAAY,OACd,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
|