@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,97 @@
|
|
|
1
|
+
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
+
import { WeekDay } from "../../types/date-types.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../@warlock.js/seal/src/rules/date/date.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Date rule - validates date format
|
|
7
|
+
*/
|
|
8
|
+
declare const dateRule: SchemaRule;
|
|
9
|
+
/**
|
|
10
|
+
* Min date rule - date must be >= given date or field
|
|
11
|
+
* Smart detection: date value or field name
|
|
12
|
+
*/
|
|
13
|
+
declare const minDateRule: SchemaRule<{
|
|
14
|
+
dateOrField: Date | string | number;
|
|
15
|
+
scope?: "global" | "sibling";
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Max date rule - date must be <= given date or field
|
|
19
|
+
* Smart detection: date value or field name
|
|
20
|
+
*/
|
|
21
|
+
declare const maxDateRule: SchemaRule<{
|
|
22
|
+
dateOrField: Date | string | number;
|
|
23
|
+
scope?: "global" | "sibling";
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* From today rule - date must be today or in the future
|
|
27
|
+
*/
|
|
28
|
+
declare const fromTodayRule: SchemaRule;
|
|
29
|
+
/**
|
|
30
|
+
* Before today rule - date must be before today
|
|
31
|
+
*/
|
|
32
|
+
declare const beforeTodayRule: SchemaRule;
|
|
33
|
+
/**
|
|
34
|
+
* From hour rule - time must be from specific hour onwards
|
|
35
|
+
*/
|
|
36
|
+
declare const fromHourRule: SchemaRule<{
|
|
37
|
+
hour: number;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Before hour rule - time must be before specific hour
|
|
41
|
+
*/
|
|
42
|
+
declare const beforeHourRule: SchemaRule<{
|
|
43
|
+
hour: number;
|
|
44
|
+
}>;
|
|
45
|
+
/**
|
|
46
|
+
* Between hours rule - time must be between start and end hours
|
|
47
|
+
*/
|
|
48
|
+
declare const betweenHoursRule: SchemaRule<{
|
|
49
|
+
startHour: number;
|
|
50
|
+
endHour: number;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* From minute rule - time must be from specific minute onwards
|
|
54
|
+
*/
|
|
55
|
+
declare const fromMinuteRule: SchemaRule<{
|
|
56
|
+
minute: number;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Before minute rule - time must be before specific minute
|
|
60
|
+
*/
|
|
61
|
+
declare const beforeMinuteRule: SchemaRule<{
|
|
62
|
+
minute: number;
|
|
63
|
+
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Between minutes rule - time must be between start and end minutes
|
|
66
|
+
*/
|
|
67
|
+
declare const betweenMinutesRule: SchemaRule<{
|
|
68
|
+
startMinute: number;
|
|
69
|
+
endMinute: number;
|
|
70
|
+
}>;
|
|
71
|
+
/**
|
|
72
|
+
* Age rule - calculate age from date
|
|
73
|
+
*/
|
|
74
|
+
declare const ageRule: SchemaRule<{
|
|
75
|
+
years: number;
|
|
76
|
+
}>;
|
|
77
|
+
/**
|
|
78
|
+
* Min age rule - minimum age requirement
|
|
79
|
+
*/
|
|
80
|
+
declare const minAgeRule: SchemaRule<{
|
|
81
|
+
years: number;
|
|
82
|
+
}>;
|
|
83
|
+
/**
|
|
84
|
+
* Max age rule - maximum age requirement
|
|
85
|
+
*/
|
|
86
|
+
declare const maxAgeRule: SchemaRule<{
|
|
87
|
+
years: number;
|
|
88
|
+
}>;
|
|
89
|
+
/**
|
|
90
|
+
* Week day rule - date must be specific weekday
|
|
91
|
+
*/
|
|
92
|
+
declare const weekDayRule: SchemaRule<{
|
|
93
|
+
day: WeekDay;
|
|
94
|
+
}>;
|
|
95
|
+
//#endregion
|
|
96
|
+
export { ageRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenHoursRule, betweenMinutesRule, dateRule, fromHourRule, fromMinuteRule, fromTodayRule, maxAgeRule, maxDateRule, minAgeRule, minDateRule, weekDayRule };
|
|
97
|
+
//# sourceMappingURL=date.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.d.mts","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/date/date.ts"],"mappings":";;;;;;AAUA;cAAa,QAAA,EAAU,UAUtB;;;AAAA;AAMD;cAAa,WAAA,EAAa,UAAU;EAClC,WAAA,EAAa,IAAA;EACb,KAAA;AAAA;;;;;cAqCW,WAAA,EAAa,UAAU;EAClC,WAAA,EAAa,IAAA;EACb,KAAA;AAAA;;;;cAmCW,aAAA,EAAe,UAc3B;;;AAjDM;cAsDM,eAAA,EAAiB,UAc7B;;;;cAKY,YAAA,EAAc,UAAU;EAAG,IAAI;AAAA;;;AAL3C;cAwBY,cAAA,EAAgB,UAAU;EAAG,IAAI;AAAA;;AAnBF;AAmB5C;cAmBa,gBAAA,EAAkB,UAAU;EACvC,SAAA;EACA,OAAA;AAAA;AAFF;;;AAAA,cAwBa,cAAA,EAAgB,UAAU;EAAG,MAAM;AAAA;;;AAtBvC;cA0CI,gBAAA,EAAkB,UAAU;EAAG,MAAM;AAAA;;AApBF;AAoBhD;cAoBa,kBAAA,EAAoB,UAAU;EACzC,WAAA;EACA,SAAA;AAAA;AAFF;;;AAAA,cAyBa,OAAA,EAAS,UAAU;EAAG,KAAK;AAAA;;;AAvB7B;cAiDE,UAAA,EAAY,UAAU;EAAG,KAAK;AAAA;;AA1BH;AA0BxC;cA0Ba,UAAA,EAAY,UAAU;EAAG,KAAK;AAAA;AA1BA;AA0B3C;;AA1B2C,cAoD9B,WAAA,EAAa,UAAU;EAAG,GAAA,EAAK,OAAA;AAAA"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { isDateValue } from "../../helpers/date-helpers.mjs";
|
|
2
|
+
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
3
|
+
import "../../helpers/index.mjs";
|
|
4
|
+
import { WEEK_DAYS } from "../../types/date-types.mjs";
|
|
5
|
+
import { get } from "@mongez/reinforcements";
|
|
6
|
+
|
|
7
|
+
//#region ../../@warlock.js/seal/src/rules/date/date.ts
|
|
8
|
+
/**
|
|
9
|
+
* Date rule - validates date format
|
|
10
|
+
*/
|
|
11
|
+
const dateRule = {
|
|
12
|
+
name: "date",
|
|
13
|
+
defaultErrorMessage: "The :input must be a valid date",
|
|
14
|
+
async validate(value, context) {
|
|
15
|
+
if (value instanceof Date && !isNaN(value.getTime())) return VALID_RULE;
|
|
16
|
+
return invalidRule(this, context);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Min date rule - date must be >= given date or field
|
|
21
|
+
* Smart detection: date value or field name
|
|
22
|
+
*/
|
|
23
|
+
const minDateRule = {
|
|
24
|
+
name: "minDate",
|
|
25
|
+
description: "The field must be at least the given date or field",
|
|
26
|
+
defaultErrorMessage: "The :input must be at least :dateOrField",
|
|
27
|
+
async validate(value, context) {
|
|
28
|
+
const { dateOrField, scope = "global" } = this.context.options;
|
|
29
|
+
let compareDate;
|
|
30
|
+
if (isDateValue(dateOrField)) compareDate = new Date(dateOrField);
|
|
31
|
+
else {
|
|
32
|
+
const fieldValue = get(scope === "sibling" ? context.parent : context.allValues, dateOrField);
|
|
33
|
+
if (fieldValue === void 0) return VALID_RULE;
|
|
34
|
+
compareDate = new Date(fieldValue);
|
|
35
|
+
}
|
|
36
|
+
if (new Date(value) >= compareDate) return VALID_RULE;
|
|
37
|
+
return invalidRule(this, context);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Max date rule - date must be <= given date or field
|
|
42
|
+
* Smart detection: date value or field name
|
|
43
|
+
*/
|
|
44
|
+
const maxDateRule = {
|
|
45
|
+
name: "maxDate",
|
|
46
|
+
defaultErrorMessage: "The :input must be at most :dateOrField",
|
|
47
|
+
async validate(value, context) {
|
|
48
|
+
const { dateOrField, scope = "global" } = this.context.options;
|
|
49
|
+
let compareDate;
|
|
50
|
+
if (isDateValue(dateOrField)) compareDate = new Date(dateOrField);
|
|
51
|
+
else {
|
|
52
|
+
const fieldValue = get(scope === "sibling" ? context.parent : context.allValues, dateOrField);
|
|
53
|
+
if (fieldValue === void 0) return VALID_RULE;
|
|
54
|
+
compareDate = new Date(fieldValue);
|
|
55
|
+
}
|
|
56
|
+
if (new Date(value) <= compareDate) return VALID_RULE;
|
|
57
|
+
return invalidRule(this, context);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* From today rule - date must be today or in the future
|
|
62
|
+
*/
|
|
63
|
+
const fromTodayRule = {
|
|
64
|
+
name: "fromToday",
|
|
65
|
+
defaultErrorMessage: "The :input must be today or in the future",
|
|
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
|
+
* Before today rule - date must be before today
|
|
77
|
+
*/
|
|
78
|
+
const beforeTodayRule = {
|
|
79
|
+
name: "beforeToday",
|
|
80
|
+
defaultErrorMessage: "The :input must be before today",
|
|
81
|
+
async validate(value, context) {
|
|
82
|
+
const today = /* @__PURE__ */ new Date();
|
|
83
|
+
today.setHours(0, 0, 0, 0);
|
|
84
|
+
const inputDate = new Date(value);
|
|
85
|
+
inputDate.setHours(0, 0, 0, 0);
|
|
86
|
+
if (inputDate < today) return VALID_RULE;
|
|
87
|
+
return invalidRule(this, context);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* From hour rule - time must be from specific hour onwards
|
|
92
|
+
*/
|
|
93
|
+
const fromHourRule = {
|
|
94
|
+
name: "fromHour",
|
|
95
|
+
defaultErrorMessage: "The :input must be from :hour:00 onwards",
|
|
96
|
+
async validate(value, context) {
|
|
97
|
+
if (new Date(value).getHours() >= this.context.options.hour) return VALID_RULE;
|
|
98
|
+
this.context.translationParams.hour = this.context.options.hour;
|
|
99
|
+
return invalidRule(this, context);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Before hour rule - time must be before specific hour
|
|
104
|
+
*/
|
|
105
|
+
const beforeHourRule = {
|
|
106
|
+
name: "beforeHour",
|
|
107
|
+
defaultErrorMessage: "The :input must be before :hour:00",
|
|
108
|
+
async validate(value, context) {
|
|
109
|
+
if (new Date(value).getHours() < this.context.options.hour) return VALID_RULE;
|
|
110
|
+
this.context.translationParams.hour = this.context.options.hour;
|
|
111
|
+
return invalidRule(this, context);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Between hours rule - time must be between start and end hours
|
|
116
|
+
*/
|
|
117
|
+
const betweenHoursRule = {
|
|
118
|
+
name: "betweenHours",
|
|
119
|
+
defaultErrorMessage: "The :input must be between :startHour:00 and :endHour:00",
|
|
120
|
+
async validate(value, context) {
|
|
121
|
+
const hour = new Date(value).getHours();
|
|
122
|
+
const { startHour, endHour } = this.context.options;
|
|
123
|
+
if (hour >= startHour && hour <= endHour) return VALID_RULE;
|
|
124
|
+
this.context.translationParams.startHour = startHour;
|
|
125
|
+
this.context.translationParams.endHour = endHour;
|
|
126
|
+
return invalidRule(this, context);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* From minute rule - time must be from specific minute onwards
|
|
131
|
+
*/
|
|
132
|
+
const fromMinuteRule = {
|
|
133
|
+
name: "fromMinute",
|
|
134
|
+
defaultErrorMessage: "The :input must be from minute :minute onwards",
|
|
135
|
+
async validate(value, context) {
|
|
136
|
+
if (new Date(value).getMinutes() >= this.context.options.minute) return VALID_RULE;
|
|
137
|
+
this.context.translationParams.minute = this.context.options.minute;
|
|
138
|
+
return invalidRule(this, context);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Before minute rule - time must be before specific minute
|
|
143
|
+
*/
|
|
144
|
+
const beforeMinuteRule = {
|
|
145
|
+
name: "beforeMinute",
|
|
146
|
+
defaultErrorMessage: "The :input must be before minute :minute",
|
|
147
|
+
async validate(value, context) {
|
|
148
|
+
if (new Date(value).getMinutes() < this.context.options.minute) return VALID_RULE;
|
|
149
|
+
this.context.translationParams.minute = this.context.options.minute;
|
|
150
|
+
return invalidRule(this, context);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Between minutes rule - time must be between start and end minutes
|
|
155
|
+
*/
|
|
156
|
+
const betweenMinutesRule = {
|
|
157
|
+
name: "betweenMinutes",
|
|
158
|
+
defaultErrorMessage: "The :input must be between minute :startMinute and :endMinute",
|
|
159
|
+
async validate(value, context) {
|
|
160
|
+
const minute = new Date(value).getMinutes();
|
|
161
|
+
const { startMinute, endMinute } = this.context.options;
|
|
162
|
+
if (minute >= startMinute && minute <= endMinute) return VALID_RULE;
|
|
163
|
+
this.context.translationParams.startMinute = startMinute;
|
|
164
|
+
this.context.translationParams.endMinute = endMinute;
|
|
165
|
+
return invalidRule(this, context);
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Age rule - calculate age from date
|
|
170
|
+
*/
|
|
171
|
+
const ageRule = {
|
|
172
|
+
name: "age",
|
|
173
|
+
defaultErrorMessage: "The :input must be exactly :years years old",
|
|
174
|
+
async validate(value, context) {
|
|
175
|
+
const birthDate = new Date(value);
|
|
176
|
+
const today = /* @__PURE__ */ new Date();
|
|
177
|
+
let age = today.getFullYear() - birthDate.getFullYear();
|
|
178
|
+
const monthDiff = today.getMonth() - birthDate.getMonth();
|
|
179
|
+
if (monthDiff < 0 || monthDiff === 0 && today.getDate() < birthDate.getDate()) age--;
|
|
180
|
+
if (age === this.context.options.years) return VALID_RULE;
|
|
181
|
+
this.context.translationParams.years = this.context.options.years;
|
|
182
|
+
return invalidRule(this, context);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Min age rule - minimum age requirement
|
|
187
|
+
*/
|
|
188
|
+
const minAgeRule = {
|
|
189
|
+
name: "minAge",
|
|
190
|
+
defaultErrorMessage: "The :input must be at least :years years old",
|
|
191
|
+
async validate(value, context) {
|
|
192
|
+
const birthDate = new Date(value);
|
|
193
|
+
const today = /* @__PURE__ */ new Date();
|
|
194
|
+
let age = today.getFullYear() - birthDate.getFullYear();
|
|
195
|
+
const monthDiff = today.getMonth() - birthDate.getMonth();
|
|
196
|
+
if (monthDiff < 0 || monthDiff === 0 && today.getDate() < birthDate.getDate()) age--;
|
|
197
|
+
if (age >= this.context.options.years) return VALID_RULE;
|
|
198
|
+
this.context.translationParams.years = this.context.options.years;
|
|
199
|
+
return invalidRule(this, context);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* Max age rule - maximum age requirement
|
|
204
|
+
*/
|
|
205
|
+
const maxAgeRule = {
|
|
206
|
+
name: "maxAge",
|
|
207
|
+
defaultErrorMessage: "The :input must be at most :years years old",
|
|
208
|
+
async validate(value, context) {
|
|
209
|
+
const birthDate = new Date(value);
|
|
210
|
+
const today = /* @__PURE__ */ new Date();
|
|
211
|
+
let age = today.getFullYear() - birthDate.getFullYear();
|
|
212
|
+
const monthDiff = today.getMonth() - birthDate.getMonth();
|
|
213
|
+
if (monthDiff < 0 || monthDiff === 0 && today.getDate() < birthDate.getDate()) age--;
|
|
214
|
+
if (age <= this.context.options.years) return VALID_RULE;
|
|
215
|
+
this.context.translationParams.years = this.context.options.years;
|
|
216
|
+
return invalidRule(this, context);
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Week day rule - date must be specific weekday
|
|
221
|
+
*/
|
|
222
|
+
const weekDayRule = {
|
|
223
|
+
name: "weekDay",
|
|
224
|
+
defaultErrorMessage: "The :input must be a :day",
|
|
225
|
+
async validate(value, context) {
|
|
226
|
+
if (new Date(value).getDay() === WEEK_DAYS[this.context.options.day]) return VALID_RULE;
|
|
227
|
+
this.context.translatableParams.day = this.context.options.day;
|
|
228
|
+
return invalidRule(this, context);
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
//#endregion
|
|
233
|
+
export { ageRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenHoursRule, betweenMinutesRule, dateRule, fromHourRule, fromMinuteRule, fromTodayRule, maxAgeRule, maxDateRule, minAgeRule, minDateRule, weekDayRule };
|
|
234
|
+
//# sourceMappingURL=date.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.mjs","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/date/date.ts"],"sourcesContent":["import { get } from \"@mongez/reinforcements\";\r\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\r\nimport { isDateValue } from \"../../helpers/date-helpers\";\r\nimport type { SchemaRule } from \"../../types\";\r\nimport type { WeekDay } from \"../../types/date-types\";\r\nimport { WEEK_DAYS } from \"../../types/date-types\";\r\n\r\n/**\r\n * Date rule - validates date format\r\n */\r\nexport const dateRule: SchemaRule = {\r\n name: \"date\",\r\n defaultErrorMessage: \"The :input must be a valid date\",\r\n async validate(value: any, context) {\r\n if (value instanceof Date && !isNaN(value.getTime())) {\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 * Min date rule - date must be >= given date or field\r\n * Smart detection: date value or field name\r\n */\r\nexport const minDateRule: SchemaRule<{\r\n dateOrField: Date | string | number;\r\n scope?: \"global\" | \"sibling\";\r\n}> = {\r\n name: \"minDate\",\r\n description: \"The field must be at least the given date or field\",\r\n defaultErrorMessage: \"The :input must be at least :dateOrField\",\r\n async validate(value: Date, context) {\r\n const { dateOrField, scope = \"global\" } = this.context.options;\r\n let compareDate: Date;\r\n\r\n if (isDateValue(dateOrField)) {\r\n // Value comparison\r\n compareDate = new Date(dateOrField);\r\n } else {\r\n // Field comparison\r\n const source = scope === \"sibling\" ? context.parent : context.allValues;\r\n const fieldValue = get(source, dateOrField as string);\r\n\r\n if (fieldValue === undefined) {\r\n return VALID_RULE;\r\n }\r\n\r\n compareDate = new Date(fieldValue);\r\n }\r\n\r\n const inputDate = new Date(value);\r\n\r\n if (inputDate >= compareDate) {\r\n return VALID_RULE;\r\n }\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Max date rule - date must be <= given date or field\r\n * Smart detection: date value or field name\r\n */\r\nexport const maxDateRule: SchemaRule<{\r\n dateOrField: Date | string | number;\r\n scope?: \"global\" | \"sibling\";\r\n}> = {\r\n name: \"maxDate\",\r\n defaultErrorMessage: \"The :input must be at most :dateOrField\",\r\n async validate(value: Date, context) {\r\n const { dateOrField, scope = \"global\" } = this.context.options;\r\n let compareDate: Date;\r\n\r\n if (isDateValue(dateOrField)) {\r\n // Value comparison\r\n compareDate = new Date(dateOrField);\r\n } else {\r\n // Field comparison\r\n const source = scope === \"sibling\" ? context.parent : context.allValues;\r\n const fieldValue = get(source, dateOrField as string);\r\n\r\n if (fieldValue === undefined) {\r\n return VALID_RULE;\r\n }\r\n\r\n compareDate = new Date(fieldValue);\r\n }\r\n\r\n const inputDate = new Date(value);\r\n\r\n if (inputDate <= compareDate) {\r\n return VALID_RULE;\r\n }\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * From today rule - date must be today or in the future\r\n */\r\nexport const fromTodayRule: SchemaRule = {\r\n name: \"fromToday\",\r\n defaultErrorMessage: \"The :input must be today or in the future\",\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\r\n/**\r\n * Before today rule - date must be before today\r\n */\r\nexport const beforeTodayRule: SchemaRule = {\r\n name: \"beforeToday\",\r\n defaultErrorMessage: \"The :input must be before 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\r\n/**\r\n * From hour rule - time must be from specific hour onwards\r\n */\r\nexport const fromHourRule: SchemaRule<{ hour: number }> = {\r\n name: \"fromHour\",\r\n defaultErrorMessage: \"The :input must be from :hour:00 onwards\",\r\n async validate(value: Date, context) {\r\n const inputDate = new Date(value);\r\n const hour = inputDate.getHours();\r\n\r\n if (hour >= this.context.options.hour) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.hour = this.context.options.hour;\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Before hour rule - time must be before specific hour\r\n */\r\nexport const beforeHourRule: SchemaRule<{ hour: number }> = {\r\n name: \"beforeHour\",\r\n defaultErrorMessage: \"The :input must be before :hour:00\",\r\n async validate(value: Date, context) {\r\n const inputDate = new Date(value);\r\n const hour = inputDate.getHours();\r\n\r\n if (hour < this.context.options.hour) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.hour = this.context.options.hour;\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Between hours rule - time must be between start and end hours\r\n */\r\nexport const betweenHoursRule: SchemaRule<{\r\n startHour: number;\r\n endHour: number;\r\n}> = {\r\n name: \"betweenHours\",\r\n defaultErrorMessage: \"The :input must be between :startHour:00 and :endHour:00\",\r\n async validate(value: Date, context) {\r\n const inputDate = new Date(value);\r\n const hour = inputDate.getHours();\r\n const { startHour, endHour } = this.context.options;\r\n\r\n if (hour >= startHour && hour <= endHour) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.startHour = startHour;\r\n this.context.translationParams.endHour = endHour;\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * From minute rule - time must be from specific minute onwards\r\n */\r\nexport const fromMinuteRule: SchemaRule<{ minute: number }> = {\r\n name: \"fromMinute\",\r\n defaultErrorMessage: \"The :input must be from minute :minute onwards\",\r\n async validate(value: Date, context) {\r\n const inputDate = new Date(value);\r\n const minute = inputDate.getMinutes();\r\n\r\n if (minute >= this.context.options.minute) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.minute = this.context.options.minute;\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Before minute rule - time must be before specific minute\r\n */\r\nexport const beforeMinuteRule: SchemaRule<{ minute: number }> = {\r\n name: \"beforeMinute\",\r\n defaultErrorMessage: \"The :input must be before minute :minute\",\r\n async validate(value: Date, context) {\r\n const inputDate = new Date(value);\r\n const minute = inputDate.getMinutes();\r\n\r\n if (minute < this.context.options.minute) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.minute = this.context.options.minute;\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Between minutes rule - time must be between start and end minutes\r\n */\r\nexport const betweenMinutesRule: SchemaRule<{\r\n startMinute: number;\r\n endMinute: number;\r\n}> = {\r\n name: \"betweenMinutes\",\r\n defaultErrorMessage: \"The :input must be between minute :startMinute and :endMinute\",\r\n async validate(value: Date, context) {\r\n const inputDate = new Date(value);\r\n const minute = inputDate.getMinutes();\r\n const { startMinute, endMinute } = this.context.options;\r\n\r\n if (minute >= startMinute && minute <= endMinute) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.startMinute = startMinute;\r\n this.context.translationParams.endMinute = endMinute;\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Age rule - calculate age from date\r\n */\r\nexport const ageRule: SchemaRule<{ years: number }> = {\r\n name: \"age\",\r\n defaultErrorMessage: \"The :input must be exactly :years years old\",\r\n async validate(value: Date, context) {\r\n const birthDate = new Date(value);\r\n const today = new Date();\r\n let age = today.getFullYear() - birthDate.getFullYear();\r\n const monthDiff = today.getMonth() - birthDate.getMonth();\r\n\r\n if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {\r\n age--;\r\n }\r\n\r\n if (age === this.context.options.years) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.years = this.context.options.years;\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Min age rule - minimum age requirement\r\n */\r\nexport const minAgeRule: SchemaRule<{ years: number }> = {\r\n name: \"minAge\",\r\n defaultErrorMessage: \"The :input must be at least :years years old\",\r\n async validate(value: Date, context) {\r\n const birthDate = new Date(value);\r\n const today = new Date();\r\n let age = today.getFullYear() - birthDate.getFullYear();\r\n const monthDiff = today.getMonth() - birthDate.getMonth();\r\n\r\n if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {\r\n age--;\r\n }\r\n\r\n if (age >= this.context.options.years) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.years = this.context.options.years;\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Max age rule - maximum age requirement\r\n */\r\nexport const maxAgeRule: SchemaRule<{ years: number }> = {\r\n name: \"maxAge\",\r\n defaultErrorMessage: \"The :input must be at most :years years old\",\r\n async validate(value: Date, context) {\r\n const birthDate = new Date(value);\r\n const today = new Date();\r\n let age = today.getFullYear() - birthDate.getFullYear();\r\n const monthDiff = today.getMonth() - birthDate.getMonth();\r\n\r\n if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {\r\n age--;\r\n }\r\n\r\n if (age <= this.context.options.years) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.years = this.context.options.years;\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Week day rule - date must be specific weekday\r\n */\r\nexport const weekDayRule: SchemaRule<{ day: WeekDay }> = {\r\n name: \"weekDay\",\r\n defaultErrorMessage: \"The :input must be a :day\",\r\n async validate(value: Date, context) {\r\n const inputDate = new Date(value);\r\n const dayOfWeek = inputDate.getDay();\r\n const expectedDay = WEEK_DAYS[this.context.options.day];\r\n\r\n if (dayOfWeek === expectedDay) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translatableParams.day = this.context.options.day;\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n"],"mappings":";;;;;;;;;;AAUA,MAAa,WAAuB;CAClC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,iBAAiB,QAAQ,CAAC,MAAM,MAAM,QAAQ,CAAC,GACjD,OAAO;EAGT,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;;AAMA,MAAa,cAGR;CACH,MAAM;CACN,aAAa;CACb,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,EAAE,aAAa,QAAQ,aAAa,KAAK,QAAQ;EACvD,IAAI;EAEJ,IAAI,YAAY,WAAW,GAEzB,cAAc,IAAI,KAAK,WAAW;OAC7B;GAGL,MAAM,aAAa,IADJ,UAAU,YAAY,QAAQ,SAAS,QAAQ,WAC/B,WAAqB;GAEpD,IAAI,eAAe,QACjB,OAAO;GAGT,cAAc,IAAI,KAAK,UAAU;EACnC;EAIA,IAAI,IAFkB,KAAK,KAEf,KAAK,aACf,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;;AAMA,MAAa,cAGR;CACH,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,EAAE,aAAa,QAAQ,aAAa,KAAK,QAAQ;EACvD,IAAI;EAEJ,IAAI,YAAY,WAAW,GAEzB,cAAc,IAAI,KAAK,WAAW;OAC7B;GAGL,MAAM,aAAa,IADJ,UAAU,YAAY,QAAQ,SAAS,QAAQ,WAC/B,WAAqB;GAEpD,IAAI,eAAe,QACjB,OAAO;GAGT,cAAc,IAAI,KAAK,UAAU;EACnC;EAIA,IAAI,IAFkB,KAAK,KAEf,KAAK,aACf,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,gBAA4B;CACvC,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,aAAa,OACf,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,kBAA8B;CACzC,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;;;;AAKA,MAAa,eAA6C;CACxD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAInC,IAFa,IADS,KAAK,KACN,EAAE,SAEhB,KAAK,KAAK,QAAQ,QAAQ,MAC/B,OAAO;EAGT,KAAK,QAAQ,kBAAkB,OAAO,KAAK,QAAQ,QAAQ;EAC3D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,iBAA+C;CAC1D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAInC,IAFa,IADS,KAAK,KACN,EAAE,SAEhB,IAAI,KAAK,QAAQ,QAAQ,MAC9B,OAAO;EAGT,KAAK,QAAQ,kBAAkB,OAAO,KAAK,QAAQ,QAAQ;EAC3D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,mBAGR;CACH,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAEnC,MAAM,OAAO,IADS,KAAK,KACN,EAAE,SAAS;EAChC,MAAM,EAAE,WAAW,YAAY,KAAK,QAAQ;EAE5C,IAAI,QAAQ,aAAa,QAAQ,SAC/B,OAAO;EAGT,KAAK,QAAQ,kBAAkB,YAAY;EAC3C,KAAK,QAAQ,kBAAkB,UAAU;EACzC,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,iBAAiD;CAC5D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAInC,IAFe,IADO,KAAK,KACJ,EAAE,WAEhB,KAAK,KAAK,QAAQ,QAAQ,QACjC,OAAO;EAGT,KAAK,QAAQ,kBAAkB,SAAS,KAAK,QAAQ,QAAQ;EAE7D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,mBAAmD;CAC9D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAInC,IAFe,IADO,KAAK,KACJ,EAAE,WAEhB,IAAI,KAAK,QAAQ,QAAQ,QAChC,OAAO;EAGT,KAAK,QAAQ,kBAAkB,SAAS,KAAK,QAAQ,QAAQ;EAE7D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,qBAGR;CACH,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAEnC,MAAM,SAAS,IADO,KAAK,KACJ,EAAE,WAAW;EACpC,MAAM,EAAE,aAAa,cAAc,KAAK,QAAQ;EAEhD,IAAI,UAAU,eAAe,UAAU,WACrC,OAAO;EAGT,KAAK,QAAQ,kBAAkB,cAAc;EAC7C,KAAK,QAAQ,kBAAkB,YAAY;EAE3C,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,UAAyC;CACpD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,YAAY,IAAI,KAAK,KAAK;EAChC,MAAM,wBAAQ,IAAI,KAAK;EACvB,IAAI,MAAM,MAAM,YAAY,IAAI,UAAU,YAAY;EACtD,MAAM,YAAY,MAAM,SAAS,IAAI,UAAU,SAAS;EAExD,IAAI,YAAY,KAAM,cAAc,KAAK,MAAM,QAAQ,IAAI,UAAU,QAAQ,GAC3E;EAGF,IAAI,QAAQ,KAAK,QAAQ,QAAQ,OAC/B,OAAO;EAGT,KAAK,QAAQ,kBAAkB,QAAQ,KAAK,QAAQ,QAAQ;EAE5D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,aAA4C;CACvD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,YAAY,IAAI,KAAK,KAAK;EAChC,MAAM,wBAAQ,IAAI,KAAK;EACvB,IAAI,MAAM,MAAM,YAAY,IAAI,UAAU,YAAY;EACtD,MAAM,YAAY,MAAM,SAAS,IAAI,UAAU,SAAS;EAExD,IAAI,YAAY,KAAM,cAAc,KAAK,MAAM,QAAQ,IAAI,UAAU,QAAQ,GAC3E;EAGF,IAAI,OAAO,KAAK,QAAQ,QAAQ,OAC9B,OAAO;EAGT,KAAK,QAAQ,kBAAkB,QAAQ,KAAK,QAAQ,QAAQ;EAE5D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,aAA4C;CACvD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EACnC,MAAM,YAAY,IAAI,KAAK,KAAK;EAChC,MAAM,wBAAQ,IAAI,KAAK;EACvB,IAAI,MAAM,MAAM,YAAY,IAAI,UAAU,YAAY;EACtD,MAAM,YAAY,MAAM,SAAS,IAAI,UAAU,SAAS;EAExD,IAAI,YAAY,KAAM,cAAc,KAAK,MAAM,QAAQ,IAAI,UAAU,QAAQ,GAC3E;EAGF,IAAI,OAAO,KAAK,QAAQ,QAAQ,OAC9B,OAAO;EAGT,KAAK,QAAQ,kBAAkB,QAAQ,KAAK,QAAQ,QAAQ;EAE5D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,cAA4C;CACvD,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAa,SAAS;EAKnC,IAHkB,IADI,KAAK,KACD,EAAE,OAGhB,MAFQ,UAAU,KAAK,QAAQ,QAAQ,MAGjD,OAAO;EAGT,KAAK,QAAQ,mBAAmB,MAAM,KAAK,QAAQ,QAAQ;EAE3D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ageRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenHoursRule, betweenMinutesRule, dateRule, fromHourRule, fromMinuteRule, fromTodayRule, maxAgeRule, maxDateRule, minAgeRule, minDateRule, weekDayRule } from "./date.mjs";
|
|
2
|
+
import { afterTodayRule, betweenDatesRule, futureRule, pastRule, todayRule } from "./date-comparison-rules.mjs";
|
|
3
|
+
import { businessDayRule, weekdayRule, weekdaysRule, weekendRule } from "./date-day-rules.mjs";
|
|
4
|
+
import { afterFieldRule, beforeFieldRule, sameAsFieldDateRule } from "./date-field-comparison-rules.mjs";
|
|
5
|
+
import { betweenDaysRule, betweenMonthsRule, betweenTimesRule, betweenYearsRule, maxDayRule, maxMonthRule, maxYearRule, minDayRule, minMonthRule, minYearRule, monthRule, quarterRule, yearRule } from "./date-period-rules.mjs";
|
|
6
|
+
import { withinDaysRule, withinFutureDaysRule, withinPastDaysRule } from "./date-relative-rules.mjs";
|
|
7
|
+
import { betweenAgeRule, birthdayRule, leapYearRule } from "./date-special-rules.mjs";
|
|
8
|
+
|
|
9
|
+
export { };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../@warlock.js/seal/src/rules/file/dimensions.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Min width rule - image width validation
|
|
6
|
+
*/
|
|
7
|
+
declare const minWidthRule: SchemaRule<{
|
|
8
|
+
minWidth: number;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Max width rule - image width validation
|
|
12
|
+
*/
|
|
13
|
+
declare const maxWidthRule: SchemaRule<{
|
|
14
|
+
maxWidth: number;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Min height rule - image height validation
|
|
18
|
+
*/
|
|
19
|
+
declare const minHeightRule: SchemaRule<{
|
|
20
|
+
minHeight: number;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Max height rule - image height validation
|
|
24
|
+
*/
|
|
25
|
+
declare const maxHeightRule: SchemaRule<{
|
|
26
|
+
maxHeight: number;
|
|
27
|
+
}>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { maxHeightRule, maxWidthRule, minHeightRule, minWidthRule };
|
|
30
|
+
//# sourceMappingURL=dimensions.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dimensions.d.mts","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/file/dimensions.ts"],"mappings":";;;;;AAMA;cAAa,YAAA,EAAc,UAAU;EAAG,QAAQ;AAAA;AAAA;AAmBhD;;AAnBgD,cAmBnC,YAAA,EAAc,UAAU;EAAG,QAAQ;AAAA;AAmBhD;;;AAAA,cAAa,aAAA,EAAe,UAAU;EAAG,SAAS;AAAA;;;;cAmBrC,aAAA,EAAe,UAAU;EAAG,SAAS;AAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
|
+
import "../../helpers/index.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../@warlock.js/seal/src/rules/file/dimensions.ts
|
|
5
|
+
/**
|
|
6
|
+
* Min width rule - image width validation
|
|
7
|
+
*/
|
|
8
|
+
const minWidthRule = {
|
|
9
|
+
name: "minWidth",
|
|
10
|
+
defaultErrorMessage: "The :input must be at least :minWidth pixels wide",
|
|
11
|
+
async validate(value, context) {
|
|
12
|
+
if ((await value.dimensions()).width >= this.context.options.minWidth) return VALID_RULE;
|
|
13
|
+
this.context.translationParams.minWidth = this.context.options.minWidth;
|
|
14
|
+
return invalidRule(this, context);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Max width rule - image width validation
|
|
19
|
+
*/
|
|
20
|
+
const maxWidthRule = {
|
|
21
|
+
name: "maxWidth",
|
|
22
|
+
defaultErrorMessage: "The :input must be at most :maxWidth pixels wide",
|
|
23
|
+
async validate(value, context) {
|
|
24
|
+
if ((await value.dimensions()).width <= this.context.options.maxWidth) return VALID_RULE;
|
|
25
|
+
this.context.translationParams.maxWidth = this.context.options.maxWidth;
|
|
26
|
+
return invalidRule(this, context);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Min height rule - image height validation
|
|
31
|
+
*/
|
|
32
|
+
const minHeightRule = {
|
|
33
|
+
name: "minHeight",
|
|
34
|
+
defaultErrorMessage: "The :input must be at least :minHeight pixels tall",
|
|
35
|
+
async validate(value, context) {
|
|
36
|
+
if ((await value.dimensions()).height >= this.context.options.minHeight) return VALID_RULE;
|
|
37
|
+
this.context.translationParams.minHeight = this.context.options.minHeight;
|
|
38
|
+
return invalidRule(this, context);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Max height rule - image height validation
|
|
43
|
+
*/
|
|
44
|
+
const maxHeightRule = {
|
|
45
|
+
name: "maxHeight",
|
|
46
|
+
defaultErrorMessage: "The :input must be at most :maxHeight pixels tall",
|
|
47
|
+
async validate(value, context) {
|
|
48
|
+
if ((await value.dimensions()).height <= this.context.options.maxHeight) return VALID_RULE;
|
|
49
|
+
this.context.translationParams.maxHeight = this.context.options.maxHeight;
|
|
50
|
+
return invalidRule(this, context);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
export { maxHeightRule, maxWidthRule, minHeightRule, minWidthRule };
|
|
56
|
+
//# sourceMappingURL=dimensions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dimensions.mjs","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/file/dimensions.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\r\nimport type { SchemaRule } from \"../../types\";\r\n\r\n/**\r\n * Min width rule - image width validation\r\n */\r\nexport const minWidthRule: SchemaRule<{ minWidth: number }> = {\r\n name: \"minWidth\",\r\n defaultErrorMessage: \"The :input must be at least :minWidth pixels wide\",\r\n async validate(value: any, context) {\r\n const dimensions = await value.dimensions();\r\n\r\n if (dimensions.width >= this.context.options.minWidth) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.minWidth = this.context.options.minWidth;\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Max width rule - image width validation\r\n */\r\nexport const maxWidthRule: SchemaRule<{ maxWidth: number }> = {\r\n name: \"maxWidth\",\r\n defaultErrorMessage: \"The :input must be at most :maxWidth pixels wide\",\r\n async validate(value: any, context) {\r\n const dimensions = await value.dimensions();\r\n\r\n if (dimensions.width <= this.context.options.maxWidth) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.maxWidth = this.context.options.maxWidth;\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Min height rule - image height validation\r\n */\r\nexport const minHeightRule: SchemaRule<{ minHeight: number }> = {\r\n name: \"minHeight\",\r\n defaultErrorMessage: \"The :input must be at least :minHeight pixels tall\",\r\n async validate(value: any, context) {\r\n const dimensions = await value.dimensions();\r\n\r\n if (dimensions.height >= this.context.options.minHeight) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.minHeight = this.context.options.minHeight;\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Max height rule - image height validation\r\n */\r\nexport const maxHeightRule: SchemaRule<{ maxHeight: number }> = {\r\n name: \"maxHeight\",\r\n defaultErrorMessage: \"The :input must be at most :maxHeight pixels tall\",\r\n async validate(value: any, context) {\r\n const dimensions = await value.dimensions();\r\n\r\n if (dimensions.height <= this.context.options.maxHeight) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.maxHeight = this.context.options.maxHeight;\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n"],"mappings":";;;;;;;AAMA,MAAa,eAAiD;CAC5D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAGlC,KAAI,MAFqB,MAAM,WAAW,GAE3B,SAAS,KAAK,QAAQ,QAAQ,UAC3C,OAAO;EAGT,KAAK,QAAQ,kBAAkB,WAAW,KAAK,QAAQ,QAAQ;EAE/D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,eAAiD;CAC5D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAGlC,KAAI,MAFqB,MAAM,WAAW,GAE3B,SAAS,KAAK,QAAQ,QAAQ,UAC3C,OAAO;EAGT,KAAK,QAAQ,kBAAkB,WAAW,KAAK,QAAQ,QAAQ;EAE/D,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,gBAAmD;CAC9D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAGlC,KAAI,MAFqB,MAAM,WAAW,GAE3B,UAAU,KAAK,QAAQ,QAAQ,WAC5C,OAAO;EAGT,KAAK,QAAQ,kBAAkB,YAAY,KAAK,QAAQ,QAAQ;EAEhE,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,gBAAmD;CAC9D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAGlC,KAAI,MAFqB,MAAM,WAAW,GAE3B,UAAU,KAAK,QAAQ,QAAQ,WAC5C,OAAO;EAGT,KAAK,QAAQ,kBAAkB,YAAY,KAAK,QAAQ,QAAQ;EAEhE,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../@warlock.js/seal/src/rules/file/file-size.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Max file size rule
|
|
6
|
+
*/
|
|
7
|
+
declare const maxFileSizeRule: SchemaRule<{
|
|
8
|
+
maxSize: number;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Min file size rule
|
|
12
|
+
*/
|
|
13
|
+
declare const minFileSizeRule: SchemaRule<{
|
|
14
|
+
minSize: number;
|
|
15
|
+
}>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { maxFileSizeRule, minFileSizeRule };
|
|
18
|
+
//# sourceMappingURL=file-size.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-size.d.mts","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/file/file-size.ts"],"mappings":";;;;;AAMA;cAAa,eAAA,EAAiB,UAAU;EAAG,OAAO;AAAA;AAAA;AAmBlD;;AAnBkD,cAmBrC,eAAA,EAAiB,UAAU;EAAG,OAAO;AAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { humanizeSize } from "../../helpers/file.utils.mjs";
|
|
2
|
+
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
3
|
+
import "../../helpers/index.mjs";
|
|
4
|
+
|
|
5
|
+
//#region ../../@warlock.js/seal/src/rules/file/file-size.ts
|
|
6
|
+
/**
|
|
7
|
+
* Max file size rule
|
|
8
|
+
*/
|
|
9
|
+
const maxFileSizeRule = {
|
|
10
|
+
name: "maxFileSize",
|
|
11
|
+
defaultErrorMessage: "The :input must not exceed :maxSize",
|
|
12
|
+
async validate(value, context) {
|
|
13
|
+
if ((typeof value.size === "function" ? await value.size() : value.size) <= this.context.options.maxSize) return VALID_RULE;
|
|
14
|
+
this.context.translationParams.maxSize = humanizeSize(this.context.options.maxSize);
|
|
15
|
+
return invalidRule(this, context);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Min file size rule
|
|
20
|
+
*/
|
|
21
|
+
const minFileSizeRule = {
|
|
22
|
+
name: "minFileSize",
|
|
23
|
+
defaultErrorMessage: "The :input must be at least :minSize",
|
|
24
|
+
async validate(value, context) {
|
|
25
|
+
if ((typeof value.size === "function" ? await value.size() : value.size) >= this.context.options.minSize) return VALID_RULE;
|
|
26
|
+
this.context.translationParams.minSize = humanizeSize(this.context.options.minSize);
|
|
27
|
+
return invalidRule(this, context);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { maxFileSizeRule, minFileSizeRule };
|
|
33
|
+
//# sourceMappingURL=file-size.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-size.mjs","names":[],"sources":["../../../../../../../@warlock.js/seal/src/rules/file/file-size.ts"],"sourcesContent":["import { humanizeSize, invalidRule, VALID_RULE } from \"../../helpers\";\r\nimport type { SchemaRule } from \"../../types\";\r\n\r\n/**\r\n * Max file size rule\r\n */\r\nexport const maxFileSizeRule: SchemaRule<{ maxSize: number }> = {\r\n name: \"maxFileSize\",\r\n defaultErrorMessage: \"The :input must not exceed :maxSize\",\r\n async validate(value: any, context) {\r\n const size = typeof value.size === \"function\" ? await value.size() : value.size;\r\n\r\n if (size <= this.context.options.maxSize) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.maxSize = humanizeSize(this.context.options.maxSize);\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n\r\n/**\r\n * Min file size rule\r\n */\r\nexport const minFileSizeRule: SchemaRule<{ minSize: number }> = {\r\n name: \"minFileSize\",\r\n defaultErrorMessage: \"The :input must be at least :minSize\",\r\n async validate(value: any, context) {\r\n const size = typeof value.size === \"function\" ? await value.size() : value.size;\r\n\r\n if (size >= this.context.options.minSize) {\r\n return VALID_RULE;\r\n }\r\n\r\n this.context.translationParams.minSize = humanizeSize(this.context.options.minSize);\r\n\r\n return invalidRule(this, context);\r\n },\r\n};\r\n"],"mappings":";;;;;;;;AAMA,MAAa,kBAAmD;CAC9D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAGlC,KAFa,OAAO,MAAM,SAAS,aAAa,MAAM,MAAM,KAAK,IAAI,MAAM,SAE/D,KAAK,QAAQ,QAAQ,SAC/B,OAAO;EAGT,KAAK,QAAQ,kBAAkB,UAAU,aAAa,KAAK,QAAQ,QAAQ,OAAO;EAElF,OAAO,YAAY,MAAM,OAAO;CAClC;AACF;;;;AAKA,MAAa,kBAAmD;CAC9D,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAGlC,KAFa,OAAO,MAAM,SAAS,aAAa,MAAM,MAAM,KAAK,IAAI,MAAM,SAE/D,KAAK,QAAQ,QAAQ,SAC/B,OAAO;EAGT,KAAK,QAAQ,kBAAkB,UAAU,aAAa,KAAK,QAAQ,QAAQ,OAAO;EAElF,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { presentRule, requiredRule } from "./core/required.mjs";
|
|
2
|
+
import { equalRule } from "./core/equal.mjs";
|
|
3
|
+
import { forbiddenRule } from "./core/forbidden.mjs";
|
|
4
|
+
import { unionRule } from "./core/union.mjs";
|
|
5
|
+
import { whenRule } from "./core/when.mjs";
|
|
6
|
+
import "./core/index.mjs";
|
|
7
|
+
import { alphaNumericRule, alphaRule, isNumericRule } from "./string/alpha.mjs";
|
|
8
|
+
import { isCreditCardRule } from "./string/credit-card.mjs";
|
|
9
|
+
import { emailRule } from "./string/email.mjs";
|
|
10
|
+
import { cuidRule, nanoidRule, ulidRule, uuidRule } from "./string/id-formats.mjs";
|
|
11
|
+
import { ip4Rule, ip6Rule, ipRule } from "./string/ip.mjs";
|
|
12
|
+
import { matchesRule } from "./string/matches.mjs";
|
|
13
|
+
import { patternRule } from "./string/pattern.mjs";
|
|
14
|
+
import { containsRule, endsWithRule, notContainsRule, startsWithRule } from "./string/string-comparison.mjs";
|
|
15
|
+
import { strongPasswordRule } from "./string/strong-password-rule.mjs";
|
|
16
|
+
import { urlRule } from "./string/url.mjs";
|
|
17
|
+
import { withoutWhitespaceRule } from "./string/without-whitespace.mjs";
|
|
18
|
+
import "./string/index.mjs";
|
|
19
|
+
import { betweenNumbersRule, evenRule, greaterThanRule, lessThanRule, maxRule, minRule, moduloRule, negativeRule, oddRule, positiveRule } from "./number/number-rules.mjs";
|
|
20
|
+
import "./number/index.mjs";
|
|
21
|
+
import { betweenLengthRule, lengthRule, maxLengthRule, maxWordsRule, minLengthRule, minWordsRule, wordsRule } from "./length/length-rules.mjs";
|
|
22
|
+
import "./length/index.mjs";
|
|
23
|
+
import { sortedArrayRule, uniqueArrayRule } from "./array/array-rules.mjs";
|
|
24
|
+
import "./array/index.mjs";
|
|
25
|
+
import { ageRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenHoursRule, betweenMinutesRule, dateRule, fromHourRule, fromMinuteRule, fromTodayRule, maxAgeRule, maxDateRule, minAgeRule, minDateRule, weekDayRule } from "./date/date.mjs";
|
|
26
|
+
import { afterTodayRule, betweenDatesRule, futureRule, pastRule, todayRule } from "./date/date-comparison-rules.mjs";
|
|
27
|
+
import { businessDayRule, weekdayRule, weekdaysRule, weekendRule } from "./date/date-day-rules.mjs";
|
|
28
|
+
import { afterFieldRule, beforeFieldRule, sameAsFieldDateRule } from "./date/date-field-comparison-rules.mjs";
|
|
29
|
+
import { betweenDaysRule, betweenMonthsRule, betweenTimesRule, betweenYearsRule, maxDayRule, maxMonthRule, maxYearRule, minDayRule, minMonthRule, minYearRule, monthRule, quarterRule, yearRule } from "./date/date-period-rules.mjs";
|
|
30
|
+
import { withinDaysRule, withinFutureDaysRule, withinPastDaysRule } from "./date/date-relative-rules.mjs";
|
|
31
|
+
import { betweenAgeRule, birthdayRule, leapYearRule } from "./date/date-special-rules.mjs";
|
|
32
|
+
import "./date/index.mjs";
|
|
33
|
+
import { maxHeightRule, maxWidthRule, minHeightRule, minWidthRule } from "./file/dimensions.mjs";
|
|
34
|
+
import { maxFileSizeRule, minFileSizeRule } from "./file/file-size.mjs";
|
|
35
|
+
import "./file/index.mjs";
|
|
36
|
+
import { colorRule, darkColorRule, hexColorRule, hslColorRule, lightColorRule, rgbColorRule, rgbaColorRule } from "./color/color-rules.mjs";
|
|
37
|
+
import "./color/index.mjs";
|
|
38
|
+
import { requiredIfAllEmptyRule, requiredIfAllNotEmptyRule, requiredIfAnyEmptyRule, requiredIfAnyNotEmptyRule, requiredIfEmptyRule, requiredIfInRule, requiredIfNotEmptyRule, requiredIfNotInRule, requiredIfRule } from "./conditional/required-if-rules.mjs";
|
|
39
|
+
import { requiredUnlessRule } from "./conditional/required-unless-rules.mjs";
|
|
40
|
+
import { requiredWhenRule } from "./conditional/required-when-rule.mjs";
|
|
41
|
+
import { requiredWithAllRule, requiredWithAnyRule, requiredWithRule } from "./conditional/required-with-rules.mjs";
|
|
42
|
+
import { requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule } from "./conditional/required-without-rules.mjs";
|
|
43
|
+
import { presentIfEmptyRule, presentIfInRule, presentIfNotEmptyRule, presentIfNotInRule, presentIfRule } from "./conditional/present-if-rules.mjs";
|
|
44
|
+
import { presentUnlessRule } from "./conditional/present-unless-rules.mjs";
|
|
45
|
+
import { presentWithAllRule, presentWithAnyRule, presentWithRule } from "./conditional/present-with-rules.mjs";
|
|
46
|
+
import { presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule } from "./conditional/present-without-rules.mjs";
|
|
47
|
+
import { forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule } from "./conditional/forbidden-if-rules.mjs";
|
|
48
|
+
import "./conditional/index.mjs";
|
|
49
|
+
import { allowedValuesRule, enumRule, inRule, notAllowedValuesRule } from "./common/enum.mjs";
|
|
50
|
+
import { equalsFieldRule, notEqualsFieldRule } from "./common/equals-field-rules.mjs";
|
|
51
|
+
import { instanceofRule } from "./common/instanceof.mjs";
|
|
52
|
+
import { literalRule } from "./common/literal.mjs";
|
|
53
|
+
import { arrayRule, booleanRule, floatRule, intRule, numberRule, objectRule, plainObjectRule, scalarRule, stringRule } from "./common/type-rules.mjs";
|
|
54
|
+
import { unknownKeyRule } from "./common/unknown-key.mjs";
|
|
55
|
+
import "./common/index.mjs";
|
|
56
|
+
|
|
57
|
+
export { };
|