@warlock.js/seal 4.0.174 → 4.1.2
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,175 @@
|
|
|
1
|
+
# `v.date()` — method reference
|
|
2
|
+
|
|
3
|
+
`v.date()` ships a built-in mutator that normalizes strings, timestamps, and `Date` objects to a `Date` before rules run. Picking guide (`v.date()` vs `v.instanceof(Date)`) is in [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md).
|
|
4
|
+
|
|
5
|
+
## Range — global value comparison
|
|
6
|
+
|
|
7
|
+
| Method | Args | Example |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| `.min(dateOrField, msg?)` | inclusive `>=` | `v.date().min("2024-01-01")` or `v.date().min(new Date())` |
|
|
10
|
+
| `.max(dateOrField, msg?)` | inclusive `<=` | `v.date().max(new Date())` |
|
|
11
|
+
| `.before(dateOrField, msg?)` | strict `<` | `v.date().before(new Date())` |
|
|
12
|
+
| `.after(dateOrField, msg?)` | strict `>` | `v.date().after(new Date())` |
|
|
13
|
+
| `.between(start, end, msg?)` | inclusive range | `v.date().between(start, end)` |
|
|
14
|
+
|
|
15
|
+
Smart detection: a string with `-` or `/` is a date string; a plain string is a sibling field name.
|
|
16
|
+
|
|
17
|
+
## Range — explicit sibling scope
|
|
18
|
+
|
|
19
|
+
| Method | Effect |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `.minSibling(field, msg?)` | `>=` sibling field |
|
|
22
|
+
| `.maxSibling(field, msg?)` | `<=` sibling field |
|
|
23
|
+
| `.beforeSibling(field, msg?)` | `<` sibling field |
|
|
24
|
+
| `.afterSibling(field, msg?)` | `>` sibling field |
|
|
25
|
+
| `.sameAsField(field, msg?)` | `===` sibling field |
|
|
26
|
+
| `.sameAsFieldSibling(field, msg?)` | `===` sibling field (explicit scope) |
|
|
27
|
+
|
|
28
|
+
Only run inside `v.object`. Not representable in JSON Schema.
|
|
29
|
+
|
|
30
|
+
## Today / past / future
|
|
31
|
+
|
|
32
|
+
| Method | Effect |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `.today(msg?)` | exactly today |
|
|
35
|
+
| `.fromToday(msg?)` | today or future |
|
|
36
|
+
| `.beforeToday(msg?)` | strictly before today |
|
|
37
|
+
| `.afterToday(msg?)` | strictly after today |
|
|
38
|
+
| `.past(msg?)` | any past date |
|
|
39
|
+
| `.future(msg?)` | any future date |
|
|
40
|
+
|
|
41
|
+
## Relative window
|
|
42
|
+
|
|
43
|
+
| Method | Args | Effect |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| `.withinDays(n, msg?)` | within N days past or future | — |
|
|
46
|
+
| `.withinPastDays(n, msg?)` | within N days in the past | — |
|
|
47
|
+
| `.withinFutureDays(n, msg?)` | within N days in the future | — |
|
|
48
|
+
|
|
49
|
+
## Age
|
|
50
|
+
|
|
51
|
+
| Method | Args | Effect |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| `.age(years, msg?)` | exactly N years old |
|
|
54
|
+
| `.minAge(years, msg?)` | at least N years old |
|
|
55
|
+
| `.maxAge(years, msg?)` | at most N years old |
|
|
56
|
+
| `.betweenAge(min, max, msg?)` | between min/max years |
|
|
57
|
+
| `.birthday(minAge?, maxAge?, msg?)` | not in future, optional age range |
|
|
58
|
+
|
|
59
|
+
## Weekday / weekend / business day
|
|
60
|
+
|
|
61
|
+
| Method | Args | Effect |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| `.weekDay(day, msg?)` | day = `"monday"` … `"sunday"` |
|
|
64
|
+
| `.weekdays(days, msg?)` | array of weekdays |
|
|
65
|
+
| `.weekend(msg?)` | Saturday or Sunday |
|
|
66
|
+
| `.businessDay(msg?)` | Monday – Friday |
|
|
67
|
+
|
|
68
|
+
## Period — month / year / quarter
|
|
69
|
+
|
|
70
|
+
| Method | Args | Effect |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| `.month(m, msg?)` | `m` = 1–12 (or `Month` enum) |
|
|
73
|
+
| `.year(y, msg?)` | exact year |
|
|
74
|
+
| `.quarter(q, msg?)` | `q` = 1–4 |
|
|
75
|
+
| `.leapYear(msg?)` | year is a leap year |
|
|
76
|
+
| `.minYear(yearOrField, msg?)` | year `>=` |
|
|
77
|
+
| `.maxYear(yearOrField, msg?)` | year `<=` |
|
|
78
|
+
| `.minMonth(mOrField, msg?)` | month `>=` |
|
|
79
|
+
| `.maxMonth(mOrField, msg?)` | month `<=` |
|
|
80
|
+
| `.minDay(dOrField, msg?)` | day-of-month `>=` |
|
|
81
|
+
| `.maxDay(dOrField, msg?)` | day-of-month `<=` |
|
|
82
|
+
| `.betweenYears(start, end, msg?)` | inclusive year range |
|
|
83
|
+
| `.betweenMonths(start, end, msg?)` | inclusive month range |
|
|
84
|
+
| `.betweenDays(start, end, msg?)` | inclusive day-of-month range |
|
|
85
|
+
|
|
86
|
+
Each `min*` / `max*` / `between*` accepts a sibling field name. Sibling-explicit variants exist: `.minYearSibling`, `.maxYearSibling`, `.minMonthSibling`, `.maxMonthSibling`, `.minDaySibling`, `.maxDaySibling`, `.betweenYearsSibling`, `.betweenMonthsSibling`, `.betweenDaysSibling`.
|
|
87
|
+
|
|
88
|
+
## Time — hour / minute
|
|
89
|
+
|
|
90
|
+
| Method | Args | Effect |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| `.fromHour(h, msg?)` | h = 0–23, time `>= h:00` |
|
|
93
|
+
| `.beforeHour(h, msg?)` | time `< h:00` |
|
|
94
|
+
| `.betweenHours(start, end, msg?)` | inclusive hour range |
|
|
95
|
+
| `.fromMinute(m, msg?)` | m = 0–59 |
|
|
96
|
+
| `.beforeMinute(m, msg?)` | — |
|
|
97
|
+
| `.betweenMinutes(start, end, msg?)` | inclusive minute range |
|
|
98
|
+
| `.betweenTimes(start, end, msg?)` | "HH:MM" strings |
|
|
99
|
+
|
|
100
|
+
## Format
|
|
101
|
+
|
|
102
|
+
| Method | Args | Effect |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| `.format(fmt, msg?)` | dayjs format string | input must match the format |
|
|
105
|
+
|
|
106
|
+
## Mutators (pre-validation reshape)
|
|
107
|
+
|
|
108
|
+
| Method | Effect |
|
|
109
|
+
|---|---|
|
|
110
|
+
| `.toStartOfDay()` | 00:00:00.000 |
|
|
111
|
+
| `.toEndOfDay()` | 23:59:59.999 |
|
|
112
|
+
| `.toStartOfMonth()` | first day of month |
|
|
113
|
+
| `.toEndOfMonth()` | last day of month |
|
|
114
|
+
| `.toStartOfYear()` | January 1st |
|
|
115
|
+
| `.toEndOfYear()` | December 31st |
|
|
116
|
+
| `.addDays(n)` | shift by N days (negative = back) |
|
|
117
|
+
| `.addMonths(n)` | shift by N months |
|
|
118
|
+
| `.addYears(n)` | shift by N years |
|
|
119
|
+
| `.addHours(n)` | shift by N hours |
|
|
120
|
+
| `.toUTC()` | normalize to UTC |
|
|
121
|
+
|
|
122
|
+
Mutators run *before* rules. `v.date().addDays(7).future()` checks whether the shifted date is in the future.
|
|
123
|
+
|
|
124
|
+
## Transformers (post-validation, reshape `data`)
|
|
125
|
+
|
|
126
|
+
| Method | Args | Effect |
|
|
127
|
+
|---|---|---|
|
|
128
|
+
| `.toISOString()` | — | `Date` → `"2026-01-15T00:00:00.000Z"` |
|
|
129
|
+
| `.toTimestamp()` | — | `Date` → number (ms since epoch) |
|
|
130
|
+
| `.toFormat(fmt)` | dayjs format string | `Date` → formatted string |
|
|
131
|
+
| `.toDateOnly()` | — | `"YYYY-MM-DD"` |
|
|
132
|
+
| `.toTimeOnly()` | — | `"HH:mm:ss"` |
|
|
133
|
+
|
|
134
|
+
Transformers shape the *output*. `Infer<>` still resolves to `Date` even if a transformer changes the runtime shape — `Infer` reads the validator type, not the transformer pipeline.
|
|
135
|
+
|
|
136
|
+
## Defaults
|
|
137
|
+
|
|
138
|
+
| Method | Effect |
|
|
139
|
+
|---|---|
|
|
140
|
+
| `.defaultNow()` | shorthand for `.default(() => new Date())` |
|
|
141
|
+
|
|
142
|
+
## JSON Schema mapping
|
|
143
|
+
|
|
144
|
+
- `v.date()` → `{ type: "string", format: "date-time" }` by default
|
|
145
|
+
- After `.toDateOnly()` or `.format("YYYY-MM-DD")` → `{ type: "string", format: "date" }`
|
|
146
|
+
- After `.toTimeOnly()` or `.format("HH:mm:ss")` → `{ type: "string", format: "time" }`
|
|
147
|
+
- Sibling-scoped rules and most relative checks are not representable — silently omitted
|
|
148
|
+
|
|
149
|
+
## Common chains
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
// Birthday — must be 13+ and in the past
|
|
153
|
+
v.date().past().minAge(13)
|
|
154
|
+
|
|
155
|
+
// Reservation — future, business day, between hours
|
|
156
|
+
v.date().future().businessDay().betweenHours(9, 17)
|
|
157
|
+
|
|
158
|
+
// Effective date range (cross-field)
|
|
159
|
+
v.object({
|
|
160
|
+
startsAt: v.date(),
|
|
161
|
+
endsAt: v.date().afterSibling("startsAt"),
|
|
162
|
+
})
|
|
163
|
+
|
|
164
|
+
// API response — emit ISO string
|
|
165
|
+
v.date().toISOString()
|
|
166
|
+
|
|
167
|
+
// Event window — within 30 future days, normalized to UTC
|
|
168
|
+
v.date().toUTC().withinFutureDays(30)
|
|
169
|
+
|
|
170
|
+
// Quarterly report
|
|
171
|
+
v.date().quarter(1).year(2026)
|
|
172
|
+
|
|
173
|
+
// Date-only, end-of-day for inclusive comparisons
|
|
174
|
+
v.date().toEndOfDay().toDateOnly()
|
|
175
|
+
```
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# `v.number()` / `v.int()` / `v.float()` / `v.numeric()` — method reference
|
|
2
|
+
|
|
3
|
+
All four share this surface. The picking guide (which factory to call) is in [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md). For `.optional()` / `.in()` / `.oneOf()`, see [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md).
|
|
4
|
+
|
|
5
|
+
## Range — global value comparison
|
|
6
|
+
|
|
7
|
+
| Method | Args | JSON Schema | Example |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| `.min(n, msg?)` | inclusive lower bound | `minimum: n` | `v.int().min(0)` |
|
|
10
|
+
| `.max(n, msg?)` | inclusive upper bound | `maximum: n` | `v.int().max(100)` |
|
|
11
|
+
| `.between(a, b, msg?)` | inclusive range | `minimum: a, maximum: b` | `v.number().between(0, 1)` |
|
|
12
|
+
| `.greaterThan(n, msg?)` | strict `>` | `exclusiveMinimum: n` | `v.int().greaterThan(0)` |
|
|
13
|
+
| `.gt(n, msg?)` | alias for `.greaterThan` | `exclusiveMinimum: n` | — |
|
|
14
|
+
| `.lessThan(n, msg?)` | strict `<` | `exclusiveMaximum: n` | `v.int().lessThan(100)` |
|
|
15
|
+
| `.lt(n, msg?)` | alias for `.lessThan` | `exclusiveMaximum: n` | — |
|
|
16
|
+
|
|
17
|
+
`.min` / `.max` / `.between` / `.greaterThan` / `.lessThan` accept a **string** as the value — interpreted as a sibling field name (smart detection):
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
v.object({
|
|
21
|
+
minPrice: v.int(),
|
|
22
|
+
maxPrice: v.int().min("minPrice"), // maxPrice >= minPrice
|
|
23
|
+
})
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Sibling references are **not representable in JSON Schema** — silently omitted from generated output.
|
|
27
|
+
|
|
28
|
+
## Range — explicit sibling scope
|
|
29
|
+
|
|
30
|
+
For when smart detection is ambiguous (e.g. a numeric string that happens to match a field name):
|
|
31
|
+
|
|
32
|
+
| Method | Effect |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `.minSibling(field, msg?)` | value `>=` sibling field |
|
|
35
|
+
| `.maxSibling(field, msg?)` | value `<=` sibling field |
|
|
36
|
+
| `.greaterThanSibling(field, msg?)` | value `>` sibling field |
|
|
37
|
+
| `.gtSibling(field, msg?)` | alias |
|
|
38
|
+
| `.lessThanSibling(field, msg?)` | value `<` sibling field |
|
|
39
|
+
| `.ltSibling(field, msg?)` | alias |
|
|
40
|
+
| `.betweenSibling(minField, maxField, msg?)` | between two sibling fields |
|
|
41
|
+
|
|
42
|
+
These **only run inside `v.object`** — sibling resolution silently passes otherwise.
|
|
43
|
+
|
|
44
|
+
## Sign & parity
|
|
45
|
+
|
|
46
|
+
| Method | Effect | Example |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `.positive(msg?)` | value `> 0` | `v.int().positive()` |
|
|
49
|
+
| `.negative(msg?)` | value `< 0` | `v.int().negative()` |
|
|
50
|
+
| `.odd(msg?)` | value is odd | `v.int().odd()` |
|
|
51
|
+
| `.even(msg?)` | value is even | `v.int().even()` |
|
|
52
|
+
|
|
53
|
+
## Divisibility / modulo
|
|
54
|
+
|
|
55
|
+
| Method | Effect | JSON Schema |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| `.modulo(n, msg?)` | value `% n === 0` | `multipleOf: n` |
|
|
58
|
+
| `.divisibleBy(n, msg?)` | alias | `multipleOf: n` |
|
|
59
|
+
| `.multipleOf(n, msg?)` | alias | `multipleOf: n` |
|
|
60
|
+
| `.modulusOf(n, msg?)` | alias | `multipleOf: n` |
|
|
61
|
+
|
|
62
|
+
## String-form length (rare)
|
|
63
|
+
|
|
64
|
+
When the numeric value is a fixed-format code (PINs, IDs):
|
|
65
|
+
|
|
66
|
+
| Method | Effect |
|
|
67
|
+
|---|---|
|
|
68
|
+
| `.length(n, msg?)` | string-rep length must be exactly `n` |
|
|
69
|
+
| `.minLength(n, msg?)` | string-rep length `>= n` |
|
|
70
|
+
| `.maxLength(n, msg?)` | string-rep length `<= n` |
|
|
71
|
+
|
|
72
|
+
For most numeric-shaped IDs you'd use `v.string().length(n).numeric()` instead — let the value be a string.
|
|
73
|
+
|
|
74
|
+
## Mutators (pre-validation reshape)
|
|
75
|
+
|
|
76
|
+
| Method | Args | Effect |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| `.abs()` | — | `Math.abs(value)` |
|
|
79
|
+
| `.ceil()` | — | round up to integer |
|
|
80
|
+
| `.floor()` | — | round down to integer |
|
|
81
|
+
| `.round(decimals?)` | default 0 | round to N decimals |
|
|
82
|
+
| `.toFixed(decimals?)` | default 2 | format as fixed-point |
|
|
83
|
+
|
|
84
|
+
These run *before* validation rules. If you mutate `1.6` with `.ceil()`, `v.int()` sees `2` and passes. Use mutators when the input arrives in a slightly wrong form and you want to coerce, not reject.
|
|
85
|
+
|
|
86
|
+
## JSON Schema notes
|
|
87
|
+
|
|
88
|
+
- `v.number()` → `{ type: "number" }`
|
|
89
|
+
- `v.int()` → `{ type: "integer" }`
|
|
90
|
+
- `v.float()` → `{ type: "number" }` (no JSON Schema distinction from `number`)
|
|
91
|
+
- `v.numeric()` → `{ type: "number" }` (input coercion is a runtime concern)
|
|
92
|
+
- `exclusiveMinimum` / `exclusiveMaximum` are encoded as numbers in `draft-2020-12` and `openapi-3.0`, but as boolean flags + `minimum`/`maximum` in `draft-07`.
|
|
93
|
+
|
|
94
|
+
## Common chains
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
// Age
|
|
98
|
+
v.int().min(0).max(150)
|
|
99
|
+
|
|
100
|
+
// Price (cents)
|
|
101
|
+
v.int().min(0)
|
|
102
|
+
|
|
103
|
+
// Probability
|
|
104
|
+
v.number().between(0, 1)
|
|
105
|
+
|
|
106
|
+
// Even page index
|
|
107
|
+
v.int().min(0).even()
|
|
108
|
+
|
|
109
|
+
// Quantity divisible by box size
|
|
110
|
+
v.int().min(1).multipleOf(12)
|
|
111
|
+
|
|
112
|
+
// Coerced from form input
|
|
113
|
+
v.numeric().min(0).max(100)
|
|
114
|
+
|
|
115
|
+
// Cross-field range
|
|
116
|
+
v.object({
|
|
117
|
+
startYear: v.int(),
|
|
118
|
+
endYear: v.int().minSibling("startYear"),
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
// Optional with default
|
|
122
|
+
v.int().min(0).default(0).optional()
|
|
123
|
+
```
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# `v.string()` — method reference
|
|
2
|
+
|
|
3
|
+
Reference for `v.string()` / `v.email()`. Covers length, format, content, color, mutators (case, trim, mask, slug, base64, …) and what each maps to in JSON Schema.
|
|
4
|
+
|
|
5
|
+
For the picking guide (`v.string` vs `v.scalar` vs `v.literal`), see [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md). For `.optional()` / `.nullable()` / `.default()` / `.in()` / `.oneOf()`, see [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md).
|
|
6
|
+
|
|
7
|
+
## Length
|
|
8
|
+
|
|
9
|
+
| Method | Args | JSON Schema | Example |
|
|
10
|
+
|---|---|---|---|
|
|
11
|
+
| `.min(n, msg?)` | min length, inclusive | `minLength: n` | `v.string().min(3)` |
|
|
12
|
+
| `.minLength(n, msg?)` | alias for `.min()` | `minLength: n` | `v.string().minLength(3)` |
|
|
13
|
+
| `.max(n, msg?)` | max length, inclusive | `maxLength: n` | `v.string().max(120)` |
|
|
14
|
+
| `.maxLength(n, msg?)` | alias for `.max()` | `maxLength: n` | `v.string().maxLength(120)` |
|
|
15
|
+
| `.length(n, msg?)` | exact length | `minLength=maxLength=n` | `v.string().length(10)` |
|
|
16
|
+
| `.lengthBetween(a, b, msg?)` | min and max length | `minLength: a, maxLength: b` | `v.string().lengthBetween(5, 30)` |
|
|
17
|
+
|
|
18
|
+
## Format
|
|
19
|
+
|
|
20
|
+
| Method | Pattern | JSON Schema | Example |
|
|
21
|
+
|---|---|---|---|
|
|
22
|
+
| `.email(msg?)` | RFC-flavored regex | `format: "email"` | `v.string().email()` |
|
|
23
|
+
| `.url(msg?)` | http/https URL | `format: "uri"` | `v.string().url()` |
|
|
24
|
+
| `.pattern(re, msg?)` | custom regex | `pattern: re.source` | `v.string().pattern(/^[A-Z]/)` |
|
|
25
|
+
| `.alpha(msg?)` | letters only | — | `v.string().alpha()` |
|
|
26
|
+
| `.alphanumeric(msg?)` | letters + digits | — | `v.string().alphanumeric()` |
|
|
27
|
+
| `.numeric(msg?)` | digits only (string) | — | `v.string().numeric()` |
|
|
28
|
+
| `.withoutWhitespace(msg?)` | no spaces/tabs/newlines | — | `v.string().withoutWhitespace()` |
|
|
29
|
+
| `.creditCard(msg?)` | credit-card-shaped | — | `v.string().creditCard()` |
|
|
30
|
+
| `.ip(msg?)` | IPv4 or IPv6 | `format: "ipv4"` | `v.string().ip()` |
|
|
31
|
+
| `.ip4(msg?)` | IPv4 only | `format: "ipv4"` | `v.string().ip4()` |
|
|
32
|
+
| `.ip6(msg?)` | IPv6 only | `format: "ipv6"` | `v.string().ip6()` |
|
|
33
|
+
| `.strongPassword(minLen?, msg?)` | 8+ chars, upper+lower+digit+symbol | — | `v.string().strongPassword(12)` |
|
|
34
|
+
|
|
35
|
+
## ID formats
|
|
36
|
+
|
|
37
|
+
| Method | Args | JSON Schema | Example |
|
|
38
|
+
|---|---|---|---|
|
|
39
|
+
| `.uuid(version?, msg?)` | UUID, any version or restrict to 1/3/4/5/6/7 | `format: "uuid"` | `v.string().uuid(4)` |
|
|
40
|
+
| `.cuid({ version?: 1\|2 }?)` | CUID2 default (24 chars, lowercase); v1 legacy | `pattern: …` | `v.string().cuid()` |
|
|
41
|
+
| `.ulid(msg?)` | 26 chars, Crockford base32 (no I/L/O/U) | `pattern: …` | `v.string().ulid()` |
|
|
42
|
+
| `.nanoid(length?, msg?)` | URL-safe alphabet, default length 21 | `pattern: …` | `v.string().nanoid(21)` |
|
|
43
|
+
|
|
44
|
+
UUID validation is RFC 4122 strict — the variant nibble (8/9/a/b at position 17) is checked, so "looks-like-UUID-but-not-valid" inputs are rejected. CUID defaults to **CUID2** since CUID1 is deprecated by its original author; pass `{ version: 1 }` only for legacy data. nanoid's alphabet is fixed (`A-Za-z0-9_-`) — for custom alphabets use `.pattern()` directly.
|
|
45
|
+
|
|
46
|
+
## Word count
|
|
47
|
+
|
|
48
|
+
| Method | Args | Example |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| `.words(n, msg?)` | exact word count | `v.string().words(5)` |
|
|
51
|
+
| `.minWords(n, msg?)` | min words | `v.string().minWords(3)` |
|
|
52
|
+
| `.maxWords(n, msg?)` | max words | `v.string().maxWords(50)` |
|
|
53
|
+
|
|
54
|
+
## Content
|
|
55
|
+
|
|
56
|
+
| Method | Args | Example |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| `.startsWith(s, msg?)` | prefix check | `v.string().startsWith("https://")` |
|
|
59
|
+
| `.endsWith(s, msg?)` | suffix check | `v.string().endsWith(".pdf")` |
|
|
60
|
+
| `.contains(s, msg?)` | substring check | `v.string().contains("@")` |
|
|
61
|
+
| `.notContains(s, msg?)` | inverse substring | `v.string().notContains("javascript:")` |
|
|
62
|
+
|
|
63
|
+
## Color
|
|
64
|
+
|
|
65
|
+
| Method | Accepts | Example |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| `.color(msg?)` | any valid CSS color | `v.string().color()` |
|
|
68
|
+
| `.hexColor(msg?)` | `#rgb`, `#rrggbb` | `v.string().hexColor()` |
|
|
69
|
+
| `.rgbColor(msg?)` | `rgb(r,g,b)` | — |
|
|
70
|
+
| `.rgbaColor(msg?)` | `rgba(r,g,b,a)` | — |
|
|
71
|
+
| `.hslColor(msg?)` | `hsl(h,s,l)` | — |
|
|
72
|
+
| `.lightColor(msg?)` | luminance-based | — |
|
|
73
|
+
| `.darkColor(msg?)` | luminance-based | — |
|
|
74
|
+
|
|
75
|
+
JSON Schema: `format: "color"` for `.hexColor()`; the others map to `format: "color"` only via `.hexColor()` — for OpenAPI consumers expecting strict format, prefer `.hexColor()`.
|
|
76
|
+
|
|
77
|
+
## Case mutators (pre-validation)
|
|
78
|
+
|
|
79
|
+
| Method | Effect | Example |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| `.uppercase()` | "Hello" → "HELLO" | `v.string().uppercase()` |
|
|
82
|
+
| `.lowercase()` | "Hello" → "hello" | — |
|
|
83
|
+
| `.capitalize()` | "hello world" → "Hello world" | — |
|
|
84
|
+
| `.titleCase()` | "hello world" → "Hello World" | — |
|
|
85
|
+
| `.camelCase()` | "hello world" → "helloWorld" | — |
|
|
86
|
+
| `.pascalCase()` | "hello world" → "HelloWorld" | — |
|
|
87
|
+
| `.snakeCase()` | "hello world" → "hello_world" | — |
|
|
88
|
+
| `.kebabCase()` | "hello world" → "hello-world" | — |
|
|
89
|
+
|
|
90
|
+
## Trim & whitespace mutators
|
|
91
|
+
|
|
92
|
+
| Method | Args | Effect |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| `.trim(needle?)` | default = space | trim both ends |
|
|
95
|
+
| `.ltrim(needle?)` | — | trim left only |
|
|
96
|
+
| `.rtrim(needle?)` | — | trim right only |
|
|
97
|
+
| `.trimMultipleWhitespace()` | — | "a b" → "a b" |
|
|
98
|
+
| `.padStart(len, char?)` | char default = " " | left-pad to length |
|
|
99
|
+
| `.padEnd(len, char?)` | char default = " " | right-pad to length |
|
|
100
|
+
|
|
101
|
+
## Replace, append, modify mutators
|
|
102
|
+
|
|
103
|
+
| Method | Args | Example |
|
|
104
|
+
|---|---|---|
|
|
105
|
+
| `.replace(search, replace)` | string or RegExp + string | — |
|
|
106
|
+
| `.replaceAll(search, replace)` | string or RegExp + string | — |
|
|
107
|
+
| `.append(suffix)` | string | "foo" → "foobar" via `.append("bar")` |
|
|
108
|
+
| `.prepend(prefix)` | string | "foo" → "barfoo" via `.prepend("bar")` |
|
|
109
|
+
| `.reverse()` | — | "abc" → "cba" |
|
|
110
|
+
| `.repeat(count)` | number | "ab" → "ababab" via `.repeat(3)` |
|
|
111
|
+
| `.truncate(maxLen, suffix?)` | suffix default = "…" | "long text" → "long…" |
|
|
112
|
+
| `.mask(start, end?, char?)` | char default = "*" | "1234567890" → "12******90" |
|
|
113
|
+
|
|
114
|
+
## Filter mutators
|
|
115
|
+
|
|
116
|
+
| Method | Effect |
|
|
117
|
+
|---|---|
|
|
118
|
+
| `.toAlpha()` | strip non-letters |
|
|
119
|
+
| `.toAlphanumeric()` | strip non-alphanumerics |
|
|
120
|
+
| `.removeSpecialCharacters()` | keep alphanumerics + whitespace |
|
|
121
|
+
| `.removeNumbers()` | strip digits |
|
|
122
|
+
| `.safeHtml()` | strip HTML tags |
|
|
123
|
+
| `.htmlEscape()` | `<` → `<` etc |
|
|
124
|
+
| `.unescapeHtml()` | reverse `htmlEscape()` |
|
|
125
|
+
|
|
126
|
+
## Encoding mutators
|
|
127
|
+
|
|
128
|
+
| Method | Effect |
|
|
129
|
+
|---|---|
|
|
130
|
+
| `.base64Encode()` | utf8 → base64 |
|
|
131
|
+
| `.base64Decode()` | base64 → utf8 |
|
|
132
|
+
| `.urlEncode()` | percent-encode |
|
|
133
|
+
| `.urlDecode()` | percent-decode |
|
|
134
|
+
| `.slug()` | "Hello World!" → "hello-world" |
|
|
135
|
+
| `.toString()` | coerce non-string input to string |
|
|
136
|
+
|
|
137
|
+
## Mutator vs transformer
|
|
138
|
+
|
|
139
|
+
The methods above are **all mutators** — they reshape the value *before* validation rules run. If you want post-validation reshaping, attach via `.addTransformer(fn)` (see [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md)).
|
|
140
|
+
|
|
141
|
+
Practical implication: `v.string().min(3).trim()` runs `min(3)` against the *un-trimmed* input. To check trimmed length, mutate first: `v.string().trim().min(3)`.
|
|
142
|
+
|
|
143
|
+
## Common chains
|
|
144
|
+
|
|
145
|
+
```ts
|
|
146
|
+
// Email field
|
|
147
|
+
v.string().email()
|
|
148
|
+
|
|
149
|
+
// Username
|
|
150
|
+
v.string().min(3).max(30).alphanumeric().lowercase()
|
|
151
|
+
|
|
152
|
+
// Slug from title
|
|
153
|
+
v.string().slug()
|
|
154
|
+
|
|
155
|
+
// Strong password
|
|
156
|
+
v.string().strongPassword(12)
|
|
157
|
+
|
|
158
|
+
// URL with strict format
|
|
159
|
+
v.string().url().startsWith("https://")
|
|
160
|
+
|
|
161
|
+
// Sanitized HTML body
|
|
162
|
+
v.string().safeHtml().min(1)
|
|
163
|
+
|
|
164
|
+
// Masked phone for response
|
|
165
|
+
v.string().pattern(/^\+\d{8,}$/).mask(3, -2)
|
|
166
|
+
|
|
167
|
+
// Optional with default
|
|
168
|
+
v.string().email().default("guest@example.com").optional()
|
|
169
|
+
```
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: seal-basics
|
|
3
|
+
description: 'Start with @warlock.js/seal — the `v` factory, `validate(schema, data)`, and `Infer<typeof schema>`. Triggers: `v`, `validate`, `Infer`, `Infer.Input`, `Infer.Output`, `v.object`, `v.lazy`, `v.discriminatedUnion`, `v.computed`, `v.managed`, `ValidationResult`; "how do I start with seal", "what is the v factory", "validate a schema in warlock", "Infer.Input vs Infer.Output"; typical import `import { v, validate, type Infer } from "@warlock.js/seal"`. Skip: primitive picking — `@warlock.js/seal/pick-seal-primitive/SKILL.md`; modifiers — `@warlock.js/seal/compose-seal-modifiers/SKILL.md`; competing libs `zod`, `valibot`, `yup`, `joi`, `ajv`.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Validate with seal
|
|
7
|
+
|
|
8
|
+
Schema-first validation. Single entry point: the `v` factory. Every validator chains, composes, and infers. Schemas double as runtime validators *and* type-level shapes via `Infer<typeof schema>`, and ship `~standard` so any Standard-Schema-aware consumer accepts them directly.
|
|
9
|
+
|
|
10
|
+
> This skill is the seal **map** — read it first, then load the specific skill for the task.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
yarn add @warlock.js/seal
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Most warlock projects already have `@warlock.js/seal` transitively via `@warlock.js/core` (which re-exports the `v` factory and `Infer` types). Import direct from the package you control: `@warlock.js/seal` if you build a leaf package, `@warlock.js/core` if you write app code.
|
|
19
|
+
|
|
20
|
+
## Minimal example
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { v, validate, type Infer } from "@warlock.js/seal";
|
|
24
|
+
|
|
25
|
+
const userSchema = v.object({
|
|
26
|
+
email: v.string().email(),
|
|
27
|
+
age: v.int().min(13).optional(),
|
|
28
|
+
role: v.literal("admin", "user", "guest"),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
type User = Infer<typeof userSchema>;
|
|
32
|
+
// { email: string; age?: number; role: "admin" | "user" | "guest" }
|
|
33
|
+
|
|
34
|
+
const result = await validate(userSchema, input);
|
|
35
|
+
if (result.isValid) {
|
|
36
|
+
result.data; // typed, post-transformer
|
|
37
|
+
} else {
|
|
38
|
+
result.errors; // [{ type, error, input }, ...]
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Foundations
|
|
43
|
+
|
|
44
|
+
The 12 things that are true in every seal use:
|
|
45
|
+
|
|
46
|
+
1. **Public API is the `v` factory.** Never `new ObjectValidator(...)` from app code — bare classes lose the StandardSchema bridge typing. See [`@warlock.js/seal/bridge-standard-schema/SKILL.md`](@warlock.js/seal/bridge-standard-schema/SKILL.md).
|
|
47
|
+
2. **Every factory return is a `StandardSchemaV1<Infer.Output<T>>`.** Pass seal schemas straight into `StandardSchemaV1<T>`-typed slots — no casts.
|
|
48
|
+
3. **Two inference helpers — `Infer.Input<T>` and `Infer.Output<T>`.** Bare `Infer<T>` is an alias for `Infer.Input<T>` (the dominant usage: HTTP bodies, DTOs, form payloads). Use `Infer.Output<T>` for validated state (Cascade `Model<>` params, post-`validate()` data). See [the rules below](#inferinput-vs-inferoutput).
|
|
49
|
+
4. **Fields are required by default.** Mark optional explicitly: `.optional()`. Skip `.required()` — canonical seal style omits the redundant call; inferred types already show what's required.
|
|
50
|
+
5. **`validate(schema, data)` never throws.** Returns `Promise<ValidationResult>` with `{ isValid, data, errors }` — the validated value is `result.data`. See [`@warlock.js/seal/handle-seal-errors/SKILL.md`](@warlock.js/seal/handle-seal-errors/SKILL.md).
|
|
51
|
+
6. **Validators are immutable by default.** Every chain method (`.min(3)`, `.email()`, `.optional()`, …) returns a clone. Toggle with the `.mutable` getter.
|
|
52
|
+
7. **Two pipelines: mutators (pre-validation), transformers (post-validation).** Order: `default → mutators → required check → required-condition rule → other rules → transformers → data`. `.catch(fallback)` rescues any failure on leaf validators.
|
|
53
|
+
8. **Cross-field rules need a `v.object` parent.** Standalone scalar validators have no siblings to resolve against.
|
|
54
|
+
9. **JSON Schema generation is built-in.** `schema.toJsonSchema(target)` for `"draft-2020-12"` (default), `"draft-07"`, `"openapi-3.0"`, `"openai-strict"`. See [`@warlock.js/seal/generate-json-schema/SKILL.md`](@warlock.js/seal/generate-json-schema/SKILL.md).
|
|
55
|
+
10. **`v.computed` / `v.managed` derive — they don't validate inputs.** They produce values from siblings or context, and are **skipped** when the parent `v.object` emits JSON Schema (runtime-only constructs — calling `.toJsonSchema()` on one directly throws).
|
|
56
|
+
11. **`v.lazy(() => schema)` for recursive shapes.** Defers resolution until validate-time so self-referencing types work.
|
|
57
|
+
12. **`v.discriminatedUnion(field, branches)` for tagged unions.** Routes by a literal discriminator field instead of `matchesType()` trial — precise errors, exact inference.
|
|
58
|
+
|
|
59
|
+
## `Infer.Input` vs `Infer.Output`
|
|
60
|
+
|
|
61
|
+
The two inference shapes describe the two halves of the pipeline:
|
|
62
|
+
|
|
63
|
+
- **`Infer.Input<T>`** — what the caller sends. `.optional()`, `.default()`, `.catch()` all make a key optional (any of them means "you don't have to supply this").
|
|
64
|
+
- **`Infer.Output<T>`** — what `data` contains after validation. `.default()` and `.catch()` guarantee a value, so keys with those brands are required even when chained with `.optional()`.
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
const schema = v.object({
|
|
68
|
+
email: v.string().email().optional(),
|
|
69
|
+
status: v.enum(Status).optional().default(Status.ACTIVE),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
type In = Infer.Input<typeof schema>;
|
|
73
|
+
// { email?: string; status?: Status } ← caller may omit both
|
|
74
|
+
|
|
75
|
+
type Out = Infer.Output<typeof schema>;
|
|
76
|
+
// { email?: string; status: Status } ← default fired for status
|
|
77
|
+
|
|
78
|
+
type Default = Infer<typeof schema>; // alias for Infer.Input
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Both flavours widen with `| null` when `.nullable()` is set.
|
|
82
|
+
|
|
83
|
+
**When to reach for which:**
|
|
84
|
+
|
|
85
|
+
- `Infer.Input<T>` (or bare `Infer<T>`) — for HTTP request bodies, form payloads, DTOs, anything pre-validation. **The common case in HTTP-shaped code.**
|
|
86
|
+
- `Infer.Output<T>` — for Cascade `Model<>` params, validated state, anywhere downstream of `validate()`.
|
|
87
|
+
|
|
88
|
+
## Pick a skill
|
|
89
|
+
|
|
90
|
+
| If the task is about… | Load |
|
|
91
|
+
| --- | --- |
|
|
92
|
+
| Picking the right primitive (`v.string` vs `v.scalar`, `v.literal` vs `v.enum`, `v.date` vs `v.instanceof(Date)`) | [`@warlock.js/seal/pick-seal-primitive/SKILL.md`](@warlock.js/seal/pick-seal-primitive/SKILL.md) |
|
|
93
|
+
| Building object / array / record / tuple / union schemas, discriminated unions, recursive schemas | [`@warlock.js/seal/define-structural-shape/SKILL.md`](@warlock.js/seal/define-structural-shape/SKILL.md) |
|
|
94
|
+
| Modifiers — `.required` / `.optional` / `.nullable` / `.default` / `.catch` / `.omit`, transformer vs mutator pipelines, membership rules | [`@warlock.js/seal/compose-seal-modifiers/SKILL.md`](@warlock.js/seal/compose-seal-modifiers/SKILL.md) |
|
|
95
|
+
| Reading `ValidationResult`, branching on `error.type`, error message customization, translation | [`@warlock.js/seal/handle-seal-errors/SKILL.md`](@warlock.js/seal/handle-seal-errors/SKILL.md) |
|
|
96
|
+
| Generating JSON Schema for OpenAI strict / OpenAPI / draft-07 | [`@warlock.js/seal/generate-json-schema/SKILL.md`](@warlock.js/seal/generate-json-schema/SKILL.md) |
|
|
97
|
+
| Why a `StandardSchemaV1<T>` slot accepts/rejects a schema, the phantom-intersection design, `Result<unknown>` errors | [`@warlock.js/seal/bridge-standard-schema/SKILL.md`](@warlock.js/seal/bridge-standard-schema/SKILL.md) |
|
|
98
|
+
| Authoring custom seal plugins to add validator methods | [`@warlock.js/seal/extend-seal-with-plugins/SKILL.md`](@warlock.js/seal/extend-seal-with-plugins/SKILL.md) |
|
|
99
|
+
|
|
100
|
+
## Things NOT to do
|
|
101
|
+
|
|
102
|
+
- Don't `new ObjectValidator(...)` from app code — use `v.object(...)` so the StandardSchema bridge attaches.
|
|
103
|
+
- Don't annotate a schema with the bare class type — strips the bridge intersection. Let inference run.
|
|
104
|
+
- Don't expect `validate()` to throw on bad input — bad input lands in `result.errors`. The only things that throw are bugs (a rule's callback threw, a transformer threw).
|
|
105
|
+
- Don't expect `.requiredIf()` / `.sameAs()` to work on a standalone validator outside `v.object` — sibling resolution silently passes.
|
|
106
|
+
- Don't put `.trim()` before `.min(3)` and expect it to trim first — `.trim()` is a transformer (post-validation). For pre-validation trim, attach with `.addMutator(s => s.trim())`.
|
package/cjs/config.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Seal Configuration
|
|
3
|
-
*
|
|
4
|
-
* Global configuration for the Seal validation library
|
|
5
|
-
*/
|
|
6
|
-
import type { AttributeTranslation, RuleTranslation } from "./types";
|
|
7
|
-
export type TranslateRuleCallback = (ruleTranslation: RuleTranslation) => string;
|
|
8
|
-
export type TranslateAttributeCallback = (attributeTranslation: AttributeTranslation) => string;
|
|
9
|
-
export type SealConfig = {
|
|
10
|
-
/**
|
|
11
|
-
* Translation function for error messages
|
|
12
|
-
* Default: returns the key with attributes replaced
|
|
13
|
-
*/
|
|
14
|
-
translateRule?: TranslateRuleCallback;
|
|
15
|
-
/**
|
|
16
|
-
* Translation function for attribute messages
|
|
17
|
-
*/
|
|
18
|
-
translateAttribute?: TranslateAttributeCallback;
|
|
19
|
-
/**
|
|
20
|
-
* Default to first error only in validation
|
|
21
|
-
* Default: true
|
|
22
|
-
*/
|
|
23
|
-
firstErrorOnly?: boolean;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Configure Seal globally
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* import { configureSeal } from "@warlock.js/seal";
|
|
31
|
-
* import { trans } from "@mongez/localization";
|
|
32
|
-
*
|
|
33
|
-
* configureSeal({
|
|
34
|
-
* translateRule: (ruleTranslation) => trans(`validation.${ruleTranslation.rule.name}`, ruleTranslation.attributes),
|
|
35
|
-
* translateAttribute: (attributeTranslation) => trans(`validation.attributes.${attributeTranslation.rule.name}.${attributeTranslation.attribute}`, attributeTranslation.context.allValues),
|
|
36
|
-
* });
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
export declare function configureSeal(options: Partial<SealConfig>): void;
|
|
40
|
-
/**
|
|
41
|
-
* Get current Seal configuration
|
|
42
|
-
*/
|
|
43
|
-
export declare function getSealConfig(): SealConfig;
|
|
44
|
-
/**
|
|
45
|
-
* Reset configuration to defaults
|
|
46
|
-
*/
|
|
47
|
-
export declare function resetSealConfig(): void;
|
|
48
|
-
//# sourceMappingURL=config.d.ts.map
|
package/cjs/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAErE,MAAM,MAAM,qBAAqB,GAAG,CAClC,eAAe,EAAE,eAAe,KAC7B,MAAM,CAAC;AAEZ,MAAM,MAAM,0BAA0B,GAAG,CACvC,oBAAoB,EAAE,oBAAoB,KACvC,MAAM,CAAC;AAEZ,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC;;OAEG;IACH,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;IAEhD;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AASF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAEhE;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAE1C;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAKtC"}
|
package/cjs/config.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
'use strict';/**
|
|
2
|
-
* Seal Configuration
|
|
3
|
-
*
|
|
4
|
-
* Global configuration for the Seal validation library
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Global Seal configuration
|
|
8
|
-
*/
|
|
9
|
-
const config = {
|
|
10
|
-
firstErrorOnly: true,
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Configure Seal globally
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```ts
|
|
17
|
-
* import { configureSeal } from "@warlock.js/seal";
|
|
18
|
-
* import { trans } from "@mongez/localization";
|
|
19
|
-
*
|
|
20
|
-
* configureSeal({
|
|
21
|
-
* translateRule: (ruleTranslation) => trans(`validation.${ruleTranslation.rule.name}`, ruleTranslation.attributes),
|
|
22
|
-
* translateAttribute: (attributeTranslation) => trans(`validation.attributes.${attributeTranslation.rule.name}.${attributeTranslation.attribute}`, attributeTranslation.context.allValues),
|
|
23
|
-
* });
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
function configureSeal(options) {
|
|
27
|
-
Object.assign(config, options);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Get current Seal configuration
|
|
31
|
-
*/
|
|
32
|
-
function getSealConfig() {
|
|
33
|
-
return config;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Reset configuration to defaults
|
|
37
|
-
*/
|
|
38
|
-
function resetSealConfig() {
|
|
39
|
-
delete config.translateRule;
|
|
40
|
-
delete config.translateAttribute;
|
|
41
|
-
config.firstErrorOnly = true;
|
|
42
|
-
}exports.configureSeal=configureSeal;exports.getSealConfig=getSealConfig;exports.resetSealConfig=resetSealConfig;//# sourceMappingURL=config.js.map
|
package/cjs/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../src/config.ts"],"sourcesContent":[null],"names":[],"mappings":"aAAA;;;;AAIG;AA8BH;;AAEG;AACH,MAAM,MAAM,GAAe;AACzB,IAAA,cAAc,EAAE,IAAI;CACrB,CAAC;AAEF;;;;;;;;;;;;;AAaG;AACG,SAAU,aAAa,CAAC,OAA4B,EAAA;AACxD,IAAA,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACjC,CAAC;AAED;;AAEG;SACa,aAAa,GAAA;AAC3B,IAAA,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;AAEG;SACa,eAAe,GAAA;IAC7B,OAAO,MAAM,CAAC,aAAa,CAAC;IAC5B,OAAO,MAAM,CAAC,kBAAkB,CAAC;AAEjC,IAAA,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;AAC/B"}
|