@warlock.js/seal 5.29.0 → 5.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +2 -0
- package/cjs/index.cjs +37 -30
- package/cjs/index.cjs.map +1 -1
- package/cjs/{object-DubGC-xu.cjs → object--LXRt5RF.cjs} +10 -8
- package/cjs/object--LXRt5RF.cjs.map +1 -0
- package/cjs/object.cjs +2 -2
- package/cjs/{required-methods-BOVNRtci.cjs → required-methods-DYsRO9aZ.cjs} +97 -68
- package/cjs/required-methods-DYsRO9aZ.cjs.map +1 -0
- package/cjs/{string-DpDpgefH.cjs → string-DsqnKoSB.cjs} +6 -6
- package/cjs/string-DsqnKoSB.cjs.map +1 -0
- package/cjs/string.cjs +2 -2
- package/esm/config.d.mts +2 -1
- package/esm/config.d.mts.map +1 -1
- package/esm/config.mjs +1 -1
- package/esm/config.mjs.map +1 -1
- package/esm/factory/validate.d.mts +9 -6
- package/esm/factory/validate.d.mts.map +1 -1
- package/esm/factory/validate.mjs +12 -4
- package/esm/factory/validate.mjs.map +1 -1
- package/esm/factory/validators.d.mts +5 -5
- package/esm/factory/validators.d.mts.map +1 -1
- package/esm/factory/validators.mjs +1 -1
- package/esm/factory/validators.mjs.map +1 -1
- package/esm/helpers/date-helpers.d.mts +1 -1
- package/esm/helpers/date-helpers.d.mts.map +1 -1
- package/esm/helpers/date-helpers.mjs +1 -1
- package/esm/helpers/date-helpers.mjs.map +1 -1
- package/esm/helpers/file.utils.d.mts +1 -1
- package/esm/helpers/file.utils.d.mts.map +1 -1
- package/esm/helpers/file.utils.mjs +1 -1
- package/esm/helpers/file.utils.mjs.map +1 -1
- package/esm/helpers/get-field-value.d.mts +2 -1
- package/esm/helpers/get-field-value.d.mts.map +1 -1
- package/esm/helpers/get-field-value.mjs +1 -1
- package/esm/helpers/get-field-value.mjs.map +1 -1
- package/esm/helpers/is-empty-value.mjs +1 -1
- package/esm/helpers/is-empty-value.mjs.map +1 -1
- package/esm/helpers/path-helpers.d.mts +1 -1
- package/esm/helpers/path-helpers.d.mts.map +1 -1
- package/esm/helpers/path-helpers.mjs +1 -1
- package/esm/helpers/path-helpers.mjs.map +1 -1
- package/esm/helpers/validation-helpers.d.mts +2 -1
- package/esm/helpers/validation-helpers.d.mts.map +1 -1
- package/esm/helpers/validation-helpers.mjs +1 -1
- package/esm/helpers/validation-helpers.mjs.map +1 -1
- package/esm/index.d.mts +3 -3
- package/esm/mutators/array-mutators.d.mts +2 -1
- package/esm/mutators/array-mutators.d.mts.map +1 -1
- package/esm/mutators/array-mutators.mjs +1 -1
- package/esm/mutators/array-mutators.mjs.map +1 -1
- package/esm/mutators/boolean-mutators.d.mts +2 -1
- package/esm/mutators/boolean-mutators.d.mts.map +1 -1
- package/esm/mutators/boolean-mutators.mjs +1 -1
- package/esm/mutators/boolean-mutators.mjs.map +1 -1
- package/esm/mutators/date-mutators.d.mts +2 -1
- package/esm/mutators/date-mutators.d.mts.map +1 -1
- package/esm/mutators/date-mutators.mjs +1 -1
- package/esm/mutators/date-mutators.mjs.map +1 -1
- package/esm/mutators/number-mutators.d.mts +2 -1
- package/esm/mutators/number-mutators.d.mts.map +1 -1
- package/esm/mutators/number-mutators.mjs +1 -1
- package/esm/mutators/number-mutators.mjs.map +1 -1
- package/esm/mutators/object-mutators.d.mts +2 -1
- package/esm/mutators/object-mutators.d.mts.map +1 -1
- package/esm/mutators/object-mutators.mjs +1 -1
- package/esm/mutators/object-mutators.mjs.map +1 -1
- package/esm/mutators/scalar-mutators.d.mts +2 -1
- package/esm/mutators/scalar-mutators.d.mts.map +1 -1
- package/esm/mutators/scalar-mutators.mjs +1 -1
- package/esm/mutators/scalar-mutators.mjs.map +1 -1
- package/esm/mutators/string-mutators.d.mts +2 -1
- package/esm/mutators/string-mutators.d.mts.map +1 -1
- package/esm/mutators/string-mutators.mjs +1 -1
- package/esm/mutators/string-mutators.mjs.map +1 -1
- package/esm/object.d.mts +1 -1
- package/esm/object.d.mts.map +1 -1
- package/esm/object.mjs +1 -1
- package/esm/object.mjs.map +1 -1
- package/esm/plugins/plugin-system.d.mts +1 -1
- package/esm/plugins/plugin-system.d.mts.map +1 -1
- package/esm/plugins/plugin-system.mjs +1 -1
- package/esm/plugins/plugin-system.mjs.map +1 -1
- package/esm/rules/array/array-rules.d.mts +2 -1
- package/esm/rules/array/array-rules.d.mts.map +1 -1
- package/esm/rules/array/array-rules.mjs +1 -1
- package/esm/rules/array/array-rules.mjs.map +1 -1
- package/esm/rules/color/color-rules.d.mts +2 -1
- package/esm/rules/color/color-rules.d.mts.map +1 -1
- package/esm/rules/color/color-rules.mjs +1 -1
- package/esm/rules/color/color-rules.mjs.map +1 -1
- package/esm/rules/common/enum.d.mts +2 -1
- package/esm/rules/common/enum.d.mts.map +1 -1
- package/esm/rules/common/enum.mjs +1 -1
- package/esm/rules/common/enum.mjs.map +1 -1
- package/esm/rules/common/equals-field-rules.d.mts +2 -1
- package/esm/rules/common/equals-field-rules.d.mts.map +1 -1
- package/esm/rules/common/equals-field-rules.mjs +1 -1
- package/esm/rules/common/equals-field-rules.mjs.map +1 -1
- package/esm/rules/common/instanceof.d.mts +2 -1
- package/esm/rules/common/instanceof.d.mts.map +1 -1
- package/esm/rules/common/instanceof.mjs +1 -1
- package/esm/rules/common/instanceof.mjs.map +1 -1
- package/esm/rules/common/literal.d.mts +2 -1
- package/esm/rules/common/literal.d.mts.map +1 -1
- package/esm/rules/common/literal.mjs +1 -1
- package/esm/rules/common/literal.mjs.map +1 -1
- package/esm/rules/common/type-rules.d.mts +2 -1
- package/esm/rules/common/type-rules.d.mts.map +1 -1
- package/esm/rules/common/type-rules.mjs +1 -1
- package/esm/rules/common/type-rules.mjs.map +1 -1
- package/esm/rules/common/unknown-key.d.mts +2 -1
- package/esm/rules/common/unknown-key.d.mts.map +1 -1
- package/esm/rules/common/unknown-key.mjs +1 -1
- package/esm/rules/common/unknown-key.mjs.map +1 -1
- package/esm/rules/conditional/forbidden-if-rules.d.mts +2 -1
- package/esm/rules/conditional/forbidden-if-rules.d.mts.map +1 -1
- package/esm/rules/conditional/forbidden-if-rules.mjs +1 -1
- package/esm/rules/conditional/forbidden-if-rules.mjs.map +1 -1
- package/esm/rules/conditional/present-if-rules.d.mts +2 -1
- package/esm/rules/conditional/present-if-rules.d.mts.map +1 -1
- package/esm/rules/conditional/present-if-rules.mjs +1 -1
- package/esm/rules/conditional/present-if-rules.mjs.map +1 -1
- package/esm/rules/conditional/present-unless-rules.d.mts +2 -1
- package/esm/rules/conditional/present-unless-rules.d.mts.map +1 -1
- package/esm/rules/conditional/present-unless-rules.mjs +1 -1
- package/esm/rules/conditional/present-unless-rules.mjs.map +1 -1
- package/esm/rules/conditional/present-with-rules.d.mts +2 -1
- package/esm/rules/conditional/present-with-rules.d.mts.map +1 -1
- package/esm/rules/conditional/present-with-rules.mjs +1 -1
- package/esm/rules/conditional/present-with-rules.mjs.map +1 -1
- package/esm/rules/conditional/present-without-rules.d.mts +2 -1
- package/esm/rules/conditional/present-without-rules.d.mts.map +1 -1
- package/esm/rules/conditional/present-without-rules.mjs +1 -1
- package/esm/rules/conditional/present-without-rules.mjs.map +1 -1
- package/esm/rules/conditional/required-if-rules.d.mts +2 -1
- package/esm/rules/conditional/required-if-rules.d.mts.map +1 -1
- package/esm/rules/conditional/required-if-rules.mjs +1 -1
- package/esm/rules/conditional/required-if-rules.mjs.map +1 -1
- package/esm/rules/conditional/required-unless-rules.d.mts +2 -1
- package/esm/rules/conditional/required-unless-rules.d.mts.map +1 -1
- package/esm/rules/conditional/required-unless-rules.mjs +1 -1
- package/esm/rules/conditional/required-unless-rules.mjs.map +1 -1
- package/esm/rules/conditional/required-when-rule.d.mts +2 -1
- package/esm/rules/conditional/required-when-rule.d.mts.map +1 -1
- package/esm/rules/conditional/required-when-rule.mjs +1 -1
- package/esm/rules/conditional/required-when-rule.mjs.map +1 -1
- package/esm/rules/conditional/required-with-rules.d.mts +2 -1
- package/esm/rules/conditional/required-with-rules.d.mts.map +1 -1
- package/esm/rules/conditional/required-with-rules.mjs +1 -1
- package/esm/rules/conditional/required-with-rules.mjs.map +1 -1
- package/esm/rules/conditional/required-without-rules.d.mts +2 -1
- package/esm/rules/conditional/required-without-rules.d.mts.map +1 -1
- package/esm/rules/conditional/required-without-rules.mjs +1 -1
- package/esm/rules/conditional/required-without-rules.mjs.map +1 -1
- package/esm/rules/core/equal.d.mts +2 -1
- package/esm/rules/core/equal.d.mts.map +1 -1
- package/esm/rules/core/equal.mjs +1 -1
- package/esm/rules/core/equal.mjs.map +1 -1
- package/esm/rules/core/forbidden.d.mts +2 -1
- package/esm/rules/core/forbidden.d.mts.map +1 -1
- package/esm/rules/core/forbidden.mjs +1 -1
- package/esm/rules/core/forbidden.mjs.map +1 -1
- package/esm/rules/core/required.d.mts +2 -1
- package/esm/rules/core/required.d.mts.map +1 -1
- package/esm/rules/core/required.mjs +1 -1
- package/esm/rules/core/required.mjs.map +1 -1
- package/esm/rules/core/union.d.mts +1 -1
- package/esm/rules/core/union.d.mts.map +1 -1
- package/esm/rules/core/union.mjs +3 -1
- package/esm/rules/core/union.mjs.map +1 -1
- package/esm/rules/core/when.d.mts +2 -1
- package/esm/rules/core/when.d.mts.map +1 -1
- package/esm/rules/core/when.mjs +1 -1
- package/esm/rules/core/when.mjs.map +1 -1
- package/esm/rules/date/date-comparison-rules.d.mts +2 -1
- package/esm/rules/date/date-comparison-rules.d.mts.map +1 -1
- package/esm/rules/date/date-comparison-rules.mjs +1 -1
- package/esm/rules/date/date-comparison-rules.mjs.map +1 -1
- package/esm/rules/date/date-day-rules.d.mts +2 -1
- package/esm/rules/date/date-day-rules.d.mts.map +1 -1
- package/esm/rules/date/date-day-rules.mjs +1 -1
- package/esm/rules/date/date-day-rules.mjs.map +1 -1
- package/esm/rules/date/date-field-comparison-rules.d.mts +2 -1
- package/esm/rules/date/date-field-comparison-rules.d.mts.map +1 -1
- package/esm/rules/date/date-field-comparison-rules.mjs +1 -1
- package/esm/rules/date/date-field-comparison-rules.mjs.map +1 -1
- package/esm/rules/date/date-period-rules.d.mts +2 -1
- package/esm/rules/date/date-period-rules.d.mts.map +1 -1
- package/esm/rules/date/date-period-rules.mjs +1 -1
- package/esm/rules/date/date-period-rules.mjs.map +1 -1
- package/esm/rules/date/date-relative-rules.d.mts +2 -1
- package/esm/rules/date/date-relative-rules.d.mts.map +1 -1
- package/esm/rules/date/date-relative-rules.mjs +1 -1
- package/esm/rules/date/date-relative-rules.mjs.map +1 -1
- package/esm/rules/date/date-special-rules.d.mts +2 -1
- package/esm/rules/date/date-special-rules.d.mts.map +1 -1
- package/esm/rules/date/date-special-rules.mjs +1 -1
- package/esm/rules/date/date-special-rules.mjs.map +1 -1
- package/esm/rules/date/date.d.mts +2 -1
- package/esm/rules/date/date.d.mts.map +1 -1
- package/esm/rules/date/date.mjs +1 -1
- package/esm/rules/date/date.mjs.map +1 -1
- package/esm/rules/file/dimensions.d.mts +2 -1
- package/esm/rules/file/dimensions.d.mts.map +1 -1
- package/esm/rules/file/dimensions.mjs +1 -1
- package/esm/rules/file/dimensions.mjs.map +1 -1
- package/esm/rules/file/file-size.d.mts +2 -1
- package/esm/rules/file/file-size.d.mts.map +1 -1
- package/esm/rules/file/file-size.mjs +1 -1
- package/esm/rules/file/file-size.mjs.map +1 -1
- package/esm/rules/length/length-rules.d.mts +2 -1
- package/esm/rules/length/length-rules.d.mts.map +1 -1
- package/esm/rules/length/length-rules.mjs +1 -1
- package/esm/rules/length/length-rules.mjs.map +1 -1
- package/esm/rules/number/number-rules.d.mts +2 -1
- package/esm/rules/number/number-rules.d.mts.map +1 -1
- package/esm/rules/number/number-rules.mjs +1 -1
- package/esm/rules/number/number-rules.mjs.map +1 -1
- package/esm/rules/scalar/accepted-rule.mjs +1 -1
- package/esm/rules/scalar/accepted-rule.mjs.map +1 -1
- package/esm/rules/scalar/declined-rule.mjs +1 -1
- package/esm/rules/scalar/declined-rule.mjs.map +1 -1
- package/esm/rules/string/alpha.d.mts +2 -1
- package/esm/rules/string/alpha.d.mts.map +1 -1
- package/esm/rules/string/alpha.mjs +1 -1
- package/esm/rules/string/alpha.mjs.map +1 -1
- package/esm/rules/string/credit-card.d.mts +2 -1
- package/esm/rules/string/credit-card.d.mts.map +1 -1
- package/esm/rules/string/credit-card.mjs +1 -1
- package/esm/rules/string/credit-card.mjs.map +1 -1
- package/esm/rules/string/email.d.mts +2 -1
- package/esm/rules/string/email.d.mts.map +1 -1
- package/esm/rules/string/email.mjs +1 -1
- package/esm/rules/string/email.mjs.map +1 -1
- package/esm/rules/string/id-formats.d.mts +2 -1
- package/esm/rules/string/id-formats.d.mts.map +1 -1
- package/esm/rules/string/id-formats.mjs +1 -1
- package/esm/rules/string/id-formats.mjs.map +1 -1
- package/esm/rules/string/ip.d.mts +2 -1
- package/esm/rules/string/ip.d.mts.map +1 -1
- package/esm/rules/string/ip.mjs +1 -1
- package/esm/rules/string/ip.mjs.map +1 -1
- package/esm/rules/string/matches.d.mts +2 -1
- package/esm/rules/string/matches.d.mts.map +1 -1
- package/esm/rules/string/matches.mjs +1 -1
- package/esm/rules/string/matches.mjs.map +1 -1
- package/esm/rules/string/pattern.d.mts +2 -1
- package/esm/rules/string/pattern.d.mts.map +1 -1
- package/esm/rules/string/pattern.mjs +1 -1
- package/esm/rules/string/pattern.mjs.map +1 -1
- package/esm/rules/string/string-comparison.d.mts +2 -1
- package/esm/rules/string/string-comparison.d.mts.map +1 -1
- package/esm/rules/string/string-comparison.mjs +1 -1
- package/esm/rules/string/string-comparison.mjs.map +1 -1
- package/esm/rules/string/strong-password-rule.d.mts +2 -1
- package/esm/rules/string/strong-password-rule.d.mts.map +1 -1
- package/esm/rules/string/strong-password-rule.mjs +1 -1
- package/esm/rules/string/strong-password-rule.mjs.map +1 -1
- package/esm/rules/string/url.d.mts +2 -1
- package/esm/rules/string/url.d.mts.map +1 -1
- package/esm/rules/string/url.mjs +1 -1
- package/esm/rules/string/url.mjs.map +1 -1
- package/esm/rules/string/without-whitespace.d.mts +2 -1
- package/esm/rules/string/without-whitespace.d.mts.map +1 -1
- package/esm/rules/string/without-whitespace.mjs +1 -1
- package/esm/rules/string/without-whitespace.mjs.map +1 -1
- package/esm/standard-schema/json-schema.d.mts +1 -1
- package/esm/standard-schema/json-schema.d.mts.map +1 -1
- package/esm/standard-schema/json-schema.mjs +1 -1
- package/esm/standard-schema/json-schema.mjs.map +1 -1
- package/esm/standard-schema/map-result.d.mts +2 -1
- package/esm/standard-schema/map-result.d.mts.map +1 -1
- package/esm/standard-schema/map-result.mjs +1 -1
- package/esm/standard-schema/map-result.mjs.map +1 -1
- package/esm/standard-schema/types.d.mts +1 -1
- package/esm/standard-schema/types.d.mts.map +1 -1
- package/esm/string.d.mts +1 -1
- package/esm/string.d.mts.map +1 -1
- package/esm/string.mjs +1 -1
- package/esm/string.mjs.map +1 -1
- package/esm/types/conditional-types.d.mts +1 -1
- package/esm/types/conditional-types.d.mts.map +1 -1
- package/esm/types/context-types.d.mts +8 -2
- package/esm/types/context-types.d.mts.map +1 -1
- package/esm/types/data-transformer-types.d.mts +1 -1
- package/esm/types/data-transformer-types.d.mts.map +1 -1
- package/esm/types/date-types.d.mts +1 -1
- package/esm/types/date-types.d.mts.map +1 -1
- package/esm/types/date-types.mjs +1 -1
- package/esm/types/date-types.mjs.map +1 -1
- package/esm/types/file.types.d.mts +1 -1
- package/esm/types/file.types.d.mts.map +1 -1
- package/esm/types/inference-types.d.mts +21 -4
- package/esm/types/inference-types.d.mts.map +1 -1
- package/esm/types/mutator-types.d.mts +1 -1
- package/esm/types/mutator-types.d.mts.map +1 -1
- package/esm/types/result-types.d.mts +26 -2
- package/esm/types/result-types.d.mts.map +1 -1
- package/esm/types/rule-types.d.mts +1 -1
- package/esm/types/rule-types.d.mts.map +1 -1
- package/esm/types/schema-types.d.mts +1 -1
- package/esm/types/schema-types.d.mts.map +1 -1
- package/esm/validators/any-validator.d.mts +1 -1
- package/esm/validators/any-validator.d.mts.map +1 -1
- package/esm/validators/any-validator.mjs +1 -1
- package/esm/validators/any-validator.mjs.map +1 -1
- package/esm/validators/array-validator.d.mts +1 -1
- package/esm/validators/array-validator.d.mts.map +1 -1
- package/esm/validators/array-validator.mjs +1 -1
- package/esm/validators/array-validator.mjs.map +1 -1
- package/esm/validators/base-validator.d.mts +8 -1
- package/esm/validators/base-validator.d.mts.map +1 -1
- package/esm/validators/base-validator.mjs +23 -4
- package/esm/validators/base-validator.mjs.map +1 -1
- package/esm/validators/boolean-validator.d.mts +1 -1
- package/esm/validators/boolean-validator.d.mts.map +1 -1
- package/esm/validators/boolean-validator.mjs +1 -1
- package/esm/validators/boolean-validator.mjs.map +1 -1
- package/esm/validators/computed-validator.d.mts +1 -1
- package/esm/validators/computed-validator.d.mts.map +1 -1
- package/esm/validators/computed-validator.mjs +1 -1
- package/esm/validators/computed-validator.mjs.map +1 -1
- package/esm/validators/date-validator.d.mts +2 -1
- package/esm/validators/date-validator.d.mts.map +1 -1
- package/esm/validators/date-validator.mjs +1 -1
- package/esm/validators/date-validator.mjs.map +1 -1
- package/esm/validators/discriminated-union-validator.d.mts +8 -2
- package/esm/validators/discriminated-union-validator.d.mts.map +1 -1
- package/esm/validators/discriminated-union-validator.mjs +6 -1
- package/esm/validators/discriminated-union-validator.mjs.map +1 -1
- package/esm/validators/float-validator.d.mts +1 -1
- package/esm/validators/float-validator.d.mts.map +1 -1
- package/esm/validators/float-validator.mjs +1 -1
- package/esm/validators/float-validator.mjs.map +1 -1
- package/esm/validators/instanceof-validator.d.mts +1 -1
- package/esm/validators/instanceof-validator.d.mts.map +1 -1
- package/esm/validators/instanceof-validator.mjs +1 -1
- package/esm/validators/instanceof-validator.mjs.map +1 -1
- package/esm/validators/int-validator.d.mts +1 -1
- package/esm/validators/int-validator.d.mts.map +1 -1
- package/esm/validators/int-validator.mjs +1 -1
- package/esm/validators/int-validator.mjs.map +1 -1
- package/esm/validators/lazy-validator.d.mts +1 -1
- package/esm/validators/lazy-validator.d.mts.map +1 -1
- package/esm/validators/lazy-validator.mjs +1 -1
- package/esm/validators/lazy-validator.mjs.map +1 -1
- package/esm/validators/literal-validator.d.mts +1 -1
- package/esm/validators/literal-validator.d.mts.map +1 -1
- package/esm/validators/literal-validator.mjs +5 -2
- package/esm/validators/literal-validator.mjs.map +1 -1
- package/esm/validators/managed-validator.d.mts +1 -1
- package/esm/validators/managed-validator.d.mts.map +1 -1
- package/esm/validators/managed-validator.mjs +1 -1
- package/esm/validators/managed-validator.mjs.map +1 -1
- package/esm/validators/methods/equality-conditional-methods.d.mts +2 -1
- package/esm/validators/methods/equality-conditional-methods.d.mts.map +1 -1
- package/esm/validators/methods/equality-conditional-methods.mjs +1 -1
- package/esm/validators/methods/equality-conditional-methods.mjs.map +1 -1
- package/esm/validators/methods/forbidden-methods.d.mts +1 -1
- package/esm/validators/methods/forbidden-methods.d.mts.map +1 -1
- package/esm/validators/methods/forbidden-methods.mjs +1 -1
- package/esm/validators/methods/forbidden-methods.mjs.map +1 -1
- package/esm/validators/methods/present-methods.d.mts +1 -1
- package/esm/validators/methods/present-methods.d.mts.map +1 -1
- package/esm/validators/methods/present-methods.mjs +1 -1
- package/esm/validators/methods/present-methods.mjs.map +1 -1
- package/esm/validators/methods/required-methods.d.mts +2 -1
- package/esm/validators/methods/required-methods.d.mts.map +1 -1
- package/esm/validators/methods/required-methods.mjs +1 -1
- package/esm/validators/methods/required-methods.mjs.map +1 -1
- package/esm/validators/number-validator.d.mts +1 -1
- package/esm/validators/number-validator.d.mts.map +1 -1
- package/esm/validators/number-validator.mjs +1 -1
- package/esm/validators/number-validator.mjs.map +1 -1
- package/esm/validators/numeric-validator.d.mts +1 -1
- package/esm/validators/numeric-validator.d.mts.map +1 -1
- package/esm/validators/numeric-validator.mjs +1 -1
- package/esm/validators/numeric-validator.mjs.map +1 -1
- package/esm/validators/object-validator.d.mts +1 -1
- package/esm/validators/object-validator.d.mts.map +1 -1
- package/esm/validators/object-validator.mjs +5 -3
- package/esm/validators/object-validator.mjs.map +1 -1
- package/esm/validators/primitive-validator.d.mts +1 -1
- package/esm/validators/primitive-validator.d.mts.map +1 -1
- package/esm/validators/primitive-validator.mjs +1 -1
- package/esm/validators/primitive-validator.mjs.map +1 -1
- package/esm/validators/record-validator.d.mts +1 -1
- package/esm/validators/record-validator.d.mts.map +1 -1
- package/esm/validators/record-validator.mjs +1 -1
- package/esm/validators/record-validator.mjs.map +1 -1
- package/esm/validators/scalar-validator.d.mts +1 -1
- package/esm/validators/scalar-validator.d.mts.map +1 -1
- package/esm/validators/scalar-validator.mjs +1 -1
- package/esm/validators/scalar-validator.mjs.map +1 -1
- package/esm/validators/string-validator.d.mts +1 -1
- package/esm/validators/string-validator.d.mts.map +1 -1
- package/esm/validators/string-validator.mjs +1 -1
- package/esm/validators/string-validator.mjs.map +1 -1
- package/esm/validators/tuple-validator.d.mts +1 -1
- package/esm/validators/tuple-validator.d.mts.map +1 -1
- package/esm/validators/tuple-validator.mjs +1 -1
- package/esm/validators/tuple-validator.mjs.map +1 -1
- package/esm/validators/union-validator.d.mts +1 -1
- package/esm/validators/union-validator.d.mts.map +1 -1
- package/esm/validators/union-validator.mjs +1 -1
- package/esm/validators/union-validator.mjs.map +1 -1
- package/llms-full.txt +9 -7
- package/package.json +3 -2
- package/skills/handle-seal-errors/SKILL.md +4 -6
- package/skills/pick-seal-primitive/SKILL.md +4 -0
- package/skills/seal-basics/SKILL.md +1 -1
- package/cjs/object-DubGC-xu.cjs.map +0 -1
- package/cjs/required-methods-BOVNRtci.cjs.map +0 -1
- package/cjs/string-DpDpgefH.cjs.map +0 -1
- package/esm/helpers/index.d.mts +0 -5
- package/esm/mutators/index.d.mts +0 -7
- package/esm/rules/array/index.d.mts +0 -1
- package/esm/rules/color/index.d.mts +0 -1
- package/esm/rules/common/index.d.mts +0 -6
- package/esm/rules/conditional/index.d.mts +0 -10
- package/esm/rules/core/index.d.mts +0 -5
- package/esm/rules/date/index.d.mts +0 -7
- package/esm/rules/file/index.d.mts +0 -2
- package/esm/rules/index.d.mts +0 -45
- package/esm/rules/length/index.d.mts +0 -1
- package/esm/rules/number/index.d.mts +0 -1
- package/esm/rules/string/index.d.mts +0 -11
- package/esm/standard-schema/index.d.mts +0 -3
- package/esm/types/index.d.mts +0 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let _mongez_reinforcements = require("@mongez/reinforcements");
|
|
2
2
|
let _mongez_supportive_is = require("@mongez/supportive-is");
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../../packages/seal/src/standard-schema/json-schema.ts
|
|
5
5
|
/**
|
|
6
6
|
* Apply nullable to a JSON Schema object based on the target dialect.
|
|
7
7
|
*
|
|
@@ -80,7 +80,7 @@ function getRuleOptions(rules, ruleName) {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
//#endregion
|
|
83
|
-
//#region
|
|
83
|
+
//#region ../../packages/seal/src/config.ts
|
|
84
84
|
/**
|
|
85
85
|
* Global Seal configuration
|
|
86
86
|
*/
|
|
@@ -118,9 +118,12 @@ function resetSealConfig() {
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
//#endregion
|
|
121
|
-
//#region
|
|
121
|
+
//#region ../../packages/seal/src/factory/validate.ts
|
|
122
122
|
/**
|
|
123
|
-
* Validate data against a schema
|
|
123
|
+
* Validate data against a schema.
|
|
124
|
+
*
|
|
125
|
+
* The result narrows on `isValid`: on success `data` is the schema's
|
|
126
|
+
* `Infer.Output`, on failure it is `undefined`.
|
|
124
127
|
*/
|
|
125
128
|
const validate = async (schema, data, { context: extendedContext, ...configurations } = getSealConfig() || {}) => {
|
|
126
129
|
const context = {
|
|
@@ -141,14 +144,19 @@ const validate = async (schema, data, { context: extendedContext, ...configurati
|
|
|
141
144
|
};
|
|
142
145
|
const result = await schema.validate(data, context);
|
|
143
146
|
if (!result.isValid) return {
|
|
144
|
-
|
|
147
|
+
isValid: false,
|
|
148
|
+
errors: result.errors,
|
|
145
149
|
data: void 0
|
|
146
150
|
};
|
|
147
|
-
return
|
|
151
|
+
return {
|
|
152
|
+
isValid: true,
|
|
153
|
+
errors: result.errors,
|
|
154
|
+
data: result.data
|
|
155
|
+
};
|
|
148
156
|
};
|
|
149
157
|
|
|
150
158
|
//#endregion
|
|
151
|
-
//#region
|
|
159
|
+
//#region ../../packages/seal/src/helpers/validation-helpers.ts
|
|
152
160
|
const VALID_RULE = { isValid: true };
|
|
153
161
|
/**
|
|
154
162
|
* Resolve a single attribute value through the full translation priority chain:
|
|
@@ -222,13 +230,13 @@ const invalidRule = (rule, context) => {
|
|
|
222
230
|
};
|
|
223
231
|
|
|
224
232
|
//#endregion
|
|
225
|
-
//#region
|
|
233
|
+
//#region ../../packages/seal/src/helpers/is-empty-value.ts
|
|
226
234
|
function isEmptyValue(value) {
|
|
227
235
|
return (0, _mongez_supportive_is.isEmpty)(value) && !(0, _mongez_supportive_is.isObject)(value);
|
|
228
236
|
}
|
|
229
237
|
|
|
230
238
|
//#endregion
|
|
231
|
-
//#region
|
|
239
|
+
//#region ../../packages/seal/src/helpers/date-helpers.ts
|
|
232
240
|
/**
|
|
233
241
|
* Detect if value is a date value or field name
|
|
234
242
|
*
|
|
@@ -250,7 +258,7 @@ function isDateValue(value) {
|
|
|
250
258
|
}
|
|
251
259
|
|
|
252
260
|
//#endregion
|
|
253
|
-
//#region
|
|
261
|
+
//#region ../../packages/seal/src/helpers/file.utils.ts
|
|
254
262
|
function resolveFileSize(size) {
|
|
255
263
|
if (typeof size === "number") return size;
|
|
256
264
|
switch (size.unit) {
|
|
@@ -281,7 +289,7 @@ function humanizeSize(sizeInBits) {
|
|
|
281
289
|
}
|
|
282
290
|
|
|
283
291
|
//#endregion
|
|
284
|
-
//#region
|
|
292
|
+
//#region ../../packages/seal/src/helpers/get-field-value.ts
|
|
285
293
|
/**
|
|
286
294
|
* Get field value based on scope from rule options
|
|
287
295
|
*
|
|
@@ -322,7 +330,7 @@ function getFieldValue(rule, context, fieldKey = "field") {
|
|
|
322
330
|
}
|
|
323
331
|
|
|
324
332
|
//#endregion
|
|
325
|
-
//#region
|
|
333
|
+
//#region ../../packages/seal/src/helpers/path-helpers.ts
|
|
326
334
|
/**
|
|
327
335
|
* Set the key path for nested validation
|
|
328
336
|
*/
|
|
@@ -332,7 +340,7 @@ const setKeyPath = (path, key) => {
|
|
|
332
340
|
};
|
|
333
341
|
|
|
334
342
|
//#endregion
|
|
335
|
-
//#region
|
|
343
|
+
//#region ../../packages/seal/src/rules/core/required.ts
|
|
336
344
|
/**
|
|
337
345
|
* Required rule - value must be present and not empty
|
|
338
346
|
*/
|
|
@@ -362,7 +370,7 @@ const presentRule = {
|
|
|
362
370
|
};
|
|
363
371
|
|
|
364
372
|
//#endregion
|
|
365
|
-
//#region
|
|
373
|
+
//#region ../../packages/seal/src/standard-schema/map-result.ts
|
|
366
374
|
/**
|
|
367
375
|
* Maps a Seal ValidationResult to a Standard Schema result shape.
|
|
368
376
|
*
|
|
@@ -386,7 +394,7 @@ function mapToStandardResult(result) {
|
|
|
386
394
|
}
|
|
387
395
|
|
|
388
396
|
//#endregion
|
|
389
|
-
//#region
|
|
397
|
+
//#region ../../packages/seal/src/validators/base-validator.ts
|
|
390
398
|
/**
|
|
391
399
|
* Base validator class - foundation for all validators
|
|
392
400
|
*/
|
|
@@ -797,6 +805,12 @@ var BaseValidator = class {
|
|
|
797
805
|
}
|
|
798
806
|
/**
|
|
799
807
|
* Define custom rule
|
|
808
|
+
*
|
|
809
|
+
* `value` is deliberately untyped: custom rules run in the rule pipeline,
|
|
810
|
+
* before a container validates its children (an object's fields are not yet
|
|
811
|
+
* validated or defaulted) and, when `firstErrorOnly` is `false` (the default
|
|
812
|
+
* is `true`), even after the type rule has failed. Typing it as the schema
|
|
813
|
+
* output would promise a shape the callback does not always receive.
|
|
800
814
|
*/
|
|
801
815
|
refine(callback) {
|
|
802
816
|
return this.addRule({
|
|
@@ -913,14 +927,27 @@ var BaseValidator = class {
|
|
|
913
927
|
errors: [],
|
|
914
928
|
data: null
|
|
915
929
|
};
|
|
916
|
-
const
|
|
930
|
+
const input = isBlank ? void 0 : data;
|
|
931
|
+
let valueForRules = input ?? this.getDefaultValue();
|
|
932
|
+
const parentFilledDefault = context?.valueIsDefault === true;
|
|
933
|
+
if (parentFilledDefault) context.valueIsDefault = false;
|
|
934
|
+
const isUsableDefault = (value) => value !== void 0 && (value !== null || this.isNullable);
|
|
935
|
+
let blankMatchesDefault = false;
|
|
936
|
+
if (typeof input === "string" && input.trim() === "" && this.defaultValue !== void 0) {
|
|
937
|
+
const fallback = this.getDefaultValue();
|
|
938
|
+
if (typeof fallback === "string" && fallback.trim() === "") {
|
|
939
|
+
valueForRules = fallback;
|
|
940
|
+
blankMatchesDefault = true;
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
const usedDefault = blankMatchesDefault || input == null && isUsableDefault(valueForRules) || parentFilledDefault && isUsableDefault(input);
|
|
917
944
|
const mutatedData = this.isOptional && valueForRules === void 0 ? void 0 : await this.mutate(valueForRules, context);
|
|
918
945
|
const errors = [];
|
|
919
946
|
let isValid = true;
|
|
920
947
|
const isFirstErrorOnly = context.configurations?.firstErrorOnly ?? true;
|
|
921
948
|
const isEmpty = isEmptyValue(valueForRules);
|
|
922
|
-
const skipEmptyRules = this.isOptional ? valueForRules === void 0 : isEmpty;
|
|
923
|
-
const rulesToRun = this.requiredRule ? [this.requiredRule, ...this.rules] : this.rules;
|
|
949
|
+
const skipEmptyRules = usedDefault && isEmpty && valueForRules !== null && !this.matchesType(valueForRules) ? false : this.isOptional ? valueForRules === void 0 : isEmpty;
|
|
950
|
+
const rulesToRun = this.requiredRule && !usedDefault ? [this.requiredRule, ...this.rules] : this.rules;
|
|
924
951
|
for (const rule of rulesToRun) {
|
|
925
952
|
if ((rule.requiresValue ?? true) && skipEmptyRules) continue;
|
|
926
953
|
this.setRuleAttributesList(rule);
|
|
@@ -1043,7 +1070,7 @@ var BaseValidator = class {
|
|
|
1043
1070
|
};
|
|
1044
1071
|
|
|
1045
1072
|
//#endregion
|
|
1046
|
-
//#region
|
|
1073
|
+
//#region ../../packages/seal/src/rules/core/equal.ts
|
|
1047
1074
|
/**
|
|
1048
1075
|
* Equal rule - value must be equal to a specific value
|
|
1049
1076
|
*/
|
|
@@ -1060,7 +1087,7 @@ const equalRule = {
|
|
|
1060
1087
|
};
|
|
1061
1088
|
|
|
1062
1089
|
//#endregion
|
|
1063
|
-
//#region
|
|
1090
|
+
//#region ../../packages/seal/src/rules/core/forbidden.ts
|
|
1064
1091
|
/**
|
|
1065
1092
|
* Forbidden rule - value must not be present
|
|
1066
1093
|
*/
|
|
@@ -1074,14 +1101,16 @@ const forbiddenRule = {
|
|
|
1074
1101
|
};
|
|
1075
1102
|
|
|
1076
1103
|
//#endregion
|
|
1077
|
-
//#region
|
|
1104
|
+
//#region ../../packages/seal/src/rules/core/union.ts
|
|
1078
1105
|
/**
|
|
1079
1106
|
* Union rule - value must match at least one of the provided validators
|
|
1080
1107
|
*/
|
|
1081
1108
|
const unionRule = {
|
|
1082
1109
|
name: "union",
|
|
1110
|
+
requiresValue: false,
|
|
1083
1111
|
defaultErrorMessage: "Value must match one of the allowed types",
|
|
1084
1112
|
async validate(value, context) {
|
|
1113
|
+
if (value === void 0) return VALID_RULE;
|
|
1085
1114
|
const validators = this.context.options.validators;
|
|
1086
1115
|
const firstErrorOnly = context.configurations?.firstErrorOnly ?? true;
|
|
1087
1116
|
const allErrors = [];
|
|
@@ -1099,7 +1128,7 @@ const unionRule = {
|
|
|
1099
1128
|
};
|
|
1100
1129
|
|
|
1101
1130
|
//#endregion
|
|
1102
|
-
//#region
|
|
1131
|
+
//#region ../../packages/seal/src/rules/core/when.ts
|
|
1103
1132
|
/**
|
|
1104
1133
|
* When rule - conditional validation based on another field value
|
|
1105
1134
|
*/
|
|
@@ -1129,7 +1158,7 @@ const whenRule = {
|
|
|
1129
1158
|
};
|
|
1130
1159
|
|
|
1131
1160
|
//#endregion
|
|
1132
|
-
//#region
|
|
1161
|
+
//#region ../../packages/seal/src/rules/string/alpha.ts
|
|
1133
1162
|
/**
|
|
1134
1163
|
* Alpha rule - allows only alphabetic characters
|
|
1135
1164
|
*/
|
|
@@ -1165,7 +1194,7 @@ const isNumericRule = {
|
|
|
1165
1194
|
};
|
|
1166
1195
|
|
|
1167
1196
|
//#endregion
|
|
1168
|
-
//#region
|
|
1197
|
+
//#region ../../packages/seal/src/rules/string/credit-card.ts
|
|
1169
1198
|
/**
|
|
1170
1199
|
* Credit card rule - validates credit card number
|
|
1171
1200
|
*/
|
|
@@ -1192,7 +1221,7 @@ const isCreditCardRule = {
|
|
|
1192
1221
|
};
|
|
1193
1222
|
|
|
1194
1223
|
//#endregion
|
|
1195
|
-
//#region
|
|
1224
|
+
//#region ../../packages/seal/src/rules/string/email.ts
|
|
1196
1225
|
/**
|
|
1197
1226
|
* Email rule - validates email format
|
|
1198
1227
|
*/
|
|
@@ -1206,7 +1235,7 @@ const emailRule = {
|
|
|
1206
1235
|
};
|
|
1207
1236
|
|
|
1208
1237
|
//#endregion
|
|
1209
|
-
//#region
|
|
1238
|
+
//#region ../../packages/seal/src/rules/string/id-formats.ts
|
|
1210
1239
|
/**
|
|
1211
1240
|
* Modern ID format validators — UUID, CUID, ULID, nanoid.
|
|
1212
1241
|
*
|
|
@@ -1305,7 +1334,7 @@ const nanoidRule = {
|
|
|
1305
1334
|
};
|
|
1306
1335
|
|
|
1307
1336
|
//#endregion
|
|
1308
|
-
//#region
|
|
1337
|
+
//#region ../../packages/seal/src/rules/string/ip.ts
|
|
1309
1338
|
/**
|
|
1310
1339
|
* Pure, dependency-free re-implementation of Node's `net.isIP`/`isIPv4`/`isIPv6`.
|
|
1311
1340
|
* Mirrors the exact regex Node uses internally (lib/internal/net.js) so that
|
|
@@ -1366,7 +1395,7 @@ const ip6Rule = {
|
|
|
1366
1395
|
};
|
|
1367
1396
|
|
|
1368
1397
|
//#endregion
|
|
1369
|
-
//#region
|
|
1398
|
+
//#region ../../packages/seal/src/rules/string/matches.ts
|
|
1370
1399
|
/**
|
|
1371
1400
|
* Matches rule - value must match another field value
|
|
1372
1401
|
*/
|
|
@@ -1381,7 +1410,7 @@ const matchesRule = {
|
|
|
1381
1410
|
};
|
|
1382
1411
|
|
|
1383
1412
|
//#endregion
|
|
1384
|
-
//#region
|
|
1413
|
+
//#region ../../packages/seal/src/rules/string/pattern.ts
|
|
1385
1414
|
/**
|
|
1386
1415
|
* Pattern rule - validates against regex pattern
|
|
1387
1416
|
*/
|
|
@@ -1396,7 +1425,7 @@ const patternRule = {
|
|
|
1396
1425
|
};
|
|
1397
1426
|
|
|
1398
1427
|
//#endregion
|
|
1399
|
-
//#region
|
|
1428
|
+
//#region ../../packages/seal/src/rules/string/string-comparison.ts
|
|
1400
1429
|
/**
|
|
1401
1430
|
* Starts with rule
|
|
1402
1431
|
*/
|
|
@@ -1447,7 +1476,7 @@ const notContainsRule = {
|
|
|
1447
1476
|
};
|
|
1448
1477
|
|
|
1449
1478
|
//#endregion
|
|
1450
|
-
//#region
|
|
1479
|
+
//#region ../../packages/seal/src/rules/string/strong-password-rule.ts
|
|
1451
1480
|
/**
|
|
1452
1481
|
* Strong Password rule - validates password strength
|
|
1453
1482
|
* Requirements:
|
|
@@ -1473,7 +1502,7 @@ const strongPasswordRule = {
|
|
|
1473
1502
|
};
|
|
1474
1503
|
|
|
1475
1504
|
//#endregion
|
|
1476
|
-
//#region
|
|
1505
|
+
//#region ../../packages/seal/src/rules/string/url.ts
|
|
1477
1506
|
/**
|
|
1478
1507
|
* URL rule - validates URL format
|
|
1479
1508
|
*/
|
|
@@ -1491,7 +1520,7 @@ const urlRule = {
|
|
|
1491
1520
|
};
|
|
1492
1521
|
|
|
1493
1522
|
//#endregion
|
|
1494
|
-
//#region
|
|
1523
|
+
//#region ../../packages/seal/src/rules/string/without-whitespace.ts
|
|
1495
1524
|
/**
|
|
1496
1525
|
* Without whitespace rule - value must not contain whitespace
|
|
1497
1526
|
*/
|
|
@@ -1505,7 +1534,7 @@ const withoutWhitespaceRule = {
|
|
|
1505
1534
|
};
|
|
1506
1535
|
|
|
1507
1536
|
//#endregion
|
|
1508
|
-
//#region
|
|
1537
|
+
//#region ../../packages/seal/src/rules/number/number-rules.ts
|
|
1509
1538
|
/**
|
|
1510
1539
|
* Min rule - value must be equal or greater than minimum
|
|
1511
1540
|
* Supports field names with sibling scope
|
|
@@ -1695,7 +1724,7 @@ const betweenNumbersRule = {
|
|
|
1695
1724
|
};
|
|
1696
1725
|
|
|
1697
1726
|
//#endregion
|
|
1698
|
-
//#region
|
|
1727
|
+
//#region ../../packages/seal/src/rules/length/length-rules.ts
|
|
1699
1728
|
/**
|
|
1700
1729
|
* Min length rule - validates minimum length
|
|
1701
1730
|
* Works for any value with a length property (strings, arrays, etc.)
|
|
@@ -1788,7 +1817,7 @@ const wordsRule = {
|
|
|
1788
1817
|
};
|
|
1789
1818
|
|
|
1790
1819
|
//#endregion
|
|
1791
|
-
//#region
|
|
1820
|
+
//#region ../../packages/seal/src/rules/array/array-rules.ts
|
|
1792
1821
|
/**
|
|
1793
1822
|
* Unique array rule - array must contain unique values
|
|
1794
1823
|
*/
|
|
@@ -1824,7 +1853,7 @@ const sortedArrayRule = {
|
|
|
1824
1853
|
};
|
|
1825
1854
|
|
|
1826
1855
|
//#endregion
|
|
1827
|
-
//#region
|
|
1856
|
+
//#region ../../packages/seal/src/types/date-types.ts
|
|
1828
1857
|
/**
|
|
1829
1858
|
* Week day numbers mapping
|
|
1830
1859
|
*/
|
|
@@ -1839,7 +1868,7 @@ const WEEK_DAYS = {
|
|
|
1839
1868
|
};
|
|
1840
1869
|
|
|
1841
1870
|
//#endregion
|
|
1842
|
-
//#region
|
|
1871
|
+
//#region ../../packages/seal/src/rules/date/date.ts
|
|
1843
1872
|
/**
|
|
1844
1873
|
* Date rule - validates date format
|
|
1845
1874
|
*/
|
|
@@ -2065,7 +2094,7 @@ const weekDayRule = {
|
|
|
2065
2094
|
};
|
|
2066
2095
|
|
|
2067
2096
|
//#endregion
|
|
2068
|
-
//#region
|
|
2097
|
+
//#region ../../packages/seal/src/rules/date/date-comparison-rules.ts
|
|
2069
2098
|
/**
|
|
2070
2099
|
* Between dates rule - date must be between start and end dates
|
|
2071
2100
|
*/
|
|
@@ -2138,7 +2167,7 @@ const afterTodayRule = {
|
|
|
2138
2167
|
};
|
|
2139
2168
|
|
|
2140
2169
|
//#endregion
|
|
2141
|
-
//#region
|
|
2170
|
+
//#region ../../packages/seal/src/rules/date/date-day-rules.ts
|
|
2142
2171
|
/**
|
|
2143
2172
|
* Weekend rule - date must be Saturday or Sunday
|
|
2144
2173
|
*/
|
|
@@ -2193,7 +2222,7 @@ const businessDayRule = {
|
|
|
2193
2222
|
};
|
|
2194
2223
|
|
|
2195
2224
|
//#endregion
|
|
2196
|
-
//#region
|
|
2225
|
+
//#region ../../packages/seal/src/rules/date/date-field-comparison-rules.ts
|
|
2197
2226
|
/**
|
|
2198
2227
|
* Before field rule - date must be < given date or field
|
|
2199
2228
|
* Smart detection: date value or field name
|
|
@@ -2267,7 +2296,7 @@ const sameAsFieldDateRule = {
|
|
|
2267
2296
|
};
|
|
2268
2297
|
|
|
2269
2298
|
//#endregion
|
|
2270
|
-
//#region
|
|
2299
|
+
//#region ../../packages/seal/src/rules/date/date-period-rules.ts
|
|
2271
2300
|
const MONTHS = {
|
|
2272
2301
|
1: "january",
|
|
2273
2302
|
2: "february",
|
|
@@ -2661,7 +2690,7 @@ const maxDayRule = {
|
|
|
2661
2690
|
};
|
|
2662
2691
|
|
|
2663
2692
|
//#endregion
|
|
2664
|
-
//#region
|
|
2693
|
+
//#region ../../packages/seal/src/rules/date/date-relative-rules.ts
|
|
2665
2694
|
/**
|
|
2666
2695
|
* Within days rule - date must be within X days from now (past or future)
|
|
2667
2696
|
*/
|
|
@@ -2711,7 +2740,7 @@ const withinFutureDaysRule = {
|
|
|
2711
2740
|
};
|
|
2712
2741
|
|
|
2713
2742
|
//#endregion
|
|
2714
|
-
//#region
|
|
2743
|
+
//#region ../../packages/seal/src/rules/date/date-special-rules.ts
|
|
2715
2744
|
/**
|
|
2716
2745
|
* Birthday rule - valid birthday (not in future, reasonable age)
|
|
2717
2746
|
*/
|
|
@@ -2764,7 +2793,7 @@ const leapYearRule = {
|
|
|
2764
2793
|
};
|
|
2765
2794
|
|
|
2766
2795
|
//#endregion
|
|
2767
|
-
//#region
|
|
2796
|
+
//#region ../../packages/seal/src/rules/file/dimensions.ts
|
|
2768
2797
|
/**
|
|
2769
2798
|
* Min width rule - image width validation
|
|
2770
2799
|
*/
|
|
@@ -2815,7 +2844,7 @@ const maxHeightRule = {
|
|
|
2815
2844
|
};
|
|
2816
2845
|
|
|
2817
2846
|
//#endregion
|
|
2818
|
-
//#region
|
|
2847
|
+
//#region ../../packages/seal/src/rules/file/file-size.ts
|
|
2819
2848
|
/**
|
|
2820
2849
|
* Max file size rule
|
|
2821
2850
|
*/
|
|
@@ -2842,7 +2871,7 @@ const minFileSizeRule = {
|
|
|
2842
2871
|
};
|
|
2843
2872
|
|
|
2844
2873
|
//#endregion
|
|
2845
|
-
//#region
|
|
2874
|
+
//#region ../../packages/seal/src/rules/color/color-rules.ts
|
|
2846
2875
|
/**
|
|
2847
2876
|
* Color validation regex patterns
|
|
2848
2877
|
*/
|
|
@@ -2941,7 +2970,7 @@ const darkColorRule = {
|
|
|
2941
2970
|
};
|
|
2942
2971
|
|
|
2943
2972
|
//#endregion
|
|
2944
|
-
//#region
|
|
2973
|
+
//#region ../../packages/seal/src/rules/conditional/required-if-rules.ts
|
|
2945
2974
|
/**
|
|
2946
2975
|
* Required if rule - field is required if another field equals a specific value
|
|
2947
2976
|
* Supports both global and sibling scope
|
|
@@ -3136,7 +3165,7 @@ const requiredIfAnyNotEmptyRule = {
|
|
|
3136
3165
|
};
|
|
3137
3166
|
|
|
3138
3167
|
//#endregion
|
|
3139
|
-
//#region
|
|
3168
|
+
//#region ../../packages/seal/src/rules/conditional/required-unless-rules.ts
|
|
3140
3169
|
/**
|
|
3141
3170
|
* Required unless rule - field is required unless another field equals a specific value
|
|
3142
3171
|
* Supports both global and sibling scope
|
|
@@ -3160,7 +3189,7 @@ const requiredUnlessRule = {
|
|
|
3160
3189
|
};
|
|
3161
3190
|
|
|
3162
3191
|
//#endregion
|
|
3163
|
-
//#region
|
|
3192
|
+
//#region ../../packages/seal/src/rules/conditional/required-when-rule.ts
|
|
3164
3193
|
/**
|
|
3165
3194
|
* Required when callback returns true.
|
|
3166
3195
|
*
|
|
@@ -3186,7 +3215,7 @@ const requiredWhenRule = {
|
|
|
3186
3215
|
};
|
|
3187
3216
|
|
|
3188
3217
|
//#endregion
|
|
3189
|
-
//#region
|
|
3218
|
+
//#region ../../packages/seal/src/rules/conditional/required-with-rules.ts
|
|
3190
3219
|
/**
|
|
3191
3220
|
* Required with rule - field is required if another field is present
|
|
3192
3221
|
* Supports both global and sibling scope
|
|
@@ -3244,7 +3273,7 @@ const requiredWithAnyRule = {
|
|
|
3244
3273
|
};
|
|
3245
3274
|
|
|
3246
3275
|
//#endregion
|
|
3247
|
-
//#region
|
|
3276
|
+
//#region ../../packages/seal/src/rules/conditional/required-without-rules.ts
|
|
3248
3277
|
/**
|
|
3249
3278
|
* Required without rule - field is required if another field is missing
|
|
3250
3279
|
* Supports both global and sibling scope
|
|
@@ -3302,7 +3331,7 @@ const requiredWithoutAnyRule = {
|
|
|
3302
3331
|
};
|
|
3303
3332
|
|
|
3304
3333
|
//#endregion
|
|
3305
|
-
//#region
|
|
3334
|
+
//#region ../../packages/seal/src/rules/conditional/present-if-rules.ts
|
|
3306
3335
|
/**
|
|
3307
3336
|
* Present if rule - field must be present if another field equals a specific value
|
|
3308
3337
|
* Supports both global and sibling scope
|
|
@@ -3392,7 +3421,7 @@ const presentIfNotInRule = {
|
|
|
3392
3421
|
};
|
|
3393
3422
|
|
|
3394
3423
|
//#endregion
|
|
3395
|
-
//#region
|
|
3424
|
+
//#region ../../packages/seal/src/rules/conditional/present-unless-rules.ts
|
|
3396
3425
|
/**
|
|
3397
3426
|
* Present unless rule - field must be present unless another field equals a specific value
|
|
3398
3427
|
* Supports both global and sibling scope
|
|
@@ -3416,7 +3445,7 @@ const presentUnlessRule = {
|
|
|
3416
3445
|
};
|
|
3417
3446
|
|
|
3418
3447
|
//#endregion
|
|
3419
|
-
//#region
|
|
3448
|
+
//#region ../../packages/seal/src/rules/conditional/present-with-rules.ts
|
|
3420
3449
|
/**
|
|
3421
3450
|
* Present with rule - field must be present if another field is present
|
|
3422
3451
|
* Supports both global and sibling scope
|
|
@@ -3484,7 +3513,7 @@ const presentWithAnyRule = {
|
|
|
3484
3513
|
};
|
|
3485
3514
|
|
|
3486
3515
|
//#endregion
|
|
3487
|
-
//#region
|
|
3516
|
+
//#region ../../packages/seal/src/rules/conditional/present-without-rules.ts
|
|
3488
3517
|
/**
|
|
3489
3518
|
* Present without rule - field must be present if another field is missing
|
|
3490
3519
|
* Supports both global and sibling scope
|
|
@@ -3552,7 +3581,7 @@ const presentWithoutAnyRule = {
|
|
|
3552
3581
|
};
|
|
3553
3582
|
|
|
3554
3583
|
//#endregion
|
|
3555
|
-
//#region
|
|
3584
|
+
//#region ../../packages/seal/src/rules/conditional/forbidden-if-rules.ts
|
|
3556
3585
|
/**
|
|
3557
3586
|
* Forbidden if rule - field is forbidden if another field equals a specific value
|
|
3558
3587
|
* Supports both global and sibling scope
|
|
@@ -3661,7 +3690,7 @@ const forbiddenIfNotInRule = {
|
|
|
3661
3690
|
};
|
|
3662
3691
|
|
|
3663
3692
|
//#endregion
|
|
3664
|
-
//#region
|
|
3693
|
+
//#region ../../packages/seal/src/rules/common/enum.ts
|
|
3665
3694
|
/**
|
|
3666
3695
|
* Enum rule - value must be one of the enum values
|
|
3667
3696
|
*/
|
|
@@ -3733,7 +3762,7 @@ const notAllowedValuesRule = {
|
|
|
3733
3762
|
};
|
|
3734
3763
|
|
|
3735
3764
|
//#endregion
|
|
3736
|
-
//#region
|
|
3765
|
+
//#region ../../packages/seal/src/rules/common/equals-field-rules.ts
|
|
3737
3766
|
/**
|
|
3738
3767
|
* Equals field rule - value must equal another field's value
|
|
3739
3768
|
* Supports both global and sibling scope
|
|
@@ -3769,7 +3798,7 @@ const notEqualsFieldRule = {
|
|
|
3769
3798
|
};
|
|
3770
3799
|
|
|
3771
3800
|
//#endregion
|
|
3772
|
-
//#region
|
|
3801
|
+
//#region ../../packages/seal/src/rules/common/instanceof.ts
|
|
3773
3802
|
/**
|
|
3774
3803
|
* InstanceOf rule - value must be an instance of the given constructor.
|
|
3775
3804
|
*
|
|
@@ -3787,7 +3816,7 @@ const instanceofRule = {
|
|
|
3787
3816
|
};
|
|
3788
3817
|
|
|
3789
3818
|
//#endregion
|
|
3790
|
-
//#region
|
|
3819
|
+
//#region ../../packages/seal/src/rules/common/literal.ts
|
|
3791
3820
|
/**
|
|
3792
3821
|
* Literal rule - value must be strictly equal to one of the literal values.
|
|
3793
3822
|
*
|
|
@@ -3813,7 +3842,7 @@ const literalRule = {
|
|
|
3813
3842
|
};
|
|
3814
3843
|
|
|
3815
3844
|
//#endregion
|
|
3816
|
-
//#region
|
|
3845
|
+
//#region ../../packages/seal/src/rules/common/type-rules.ts
|
|
3817
3846
|
/**
|
|
3818
3847
|
* String rule - validates string type
|
|
3819
3848
|
*/
|
|
@@ -3919,7 +3948,7 @@ const arrayRule = {
|
|
|
3919
3948
|
};
|
|
3920
3949
|
|
|
3921
3950
|
//#endregion
|
|
3922
|
-
//#region
|
|
3951
|
+
//#region ../../packages/seal/src/rules/common/unknown-key.ts
|
|
3923
3952
|
/**
|
|
3924
3953
|
* Unknown key rule - validates that object doesn't have unknown keys
|
|
3925
3954
|
*/
|
|
@@ -3939,7 +3968,7 @@ const unknownKeyRule = {
|
|
|
3939
3968
|
};
|
|
3940
3969
|
|
|
3941
3970
|
//#endregion
|
|
3942
|
-
//#region
|
|
3971
|
+
//#region ../../packages/seal/src/validators/methods/equality-conditional-methods.ts
|
|
3943
3972
|
/**
|
|
3944
3973
|
* Marker re-exported by the validators barrel so the dts bundler keeps this
|
|
3945
3974
|
* module (and its `declare module` augmentation) in the bundled `.d.ts`.
|
|
@@ -4065,7 +4094,7 @@ BaseValidator.prototype.whenSibling = function(siblingField, options) {
|
|
|
4065
4094
|
};
|
|
4066
4095
|
|
|
4067
4096
|
//#endregion
|
|
4068
|
-
//#region
|
|
4097
|
+
//#region ../../packages/seal/src/validators/methods/forbidden-methods.ts
|
|
4069
4098
|
/**
|
|
4070
4099
|
* Marker re-exported by the validators barrel so the dts bundler keeps this
|
|
4071
4100
|
* module (and its `declare module` augmentation) in the bundled `.d.ts`.
|
|
@@ -4195,7 +4224,7 @@ BaseValidator.prototype.forbiddenIfNotInSibling = function(field, values, errorM
|
|
|
4195
4224
|
};
|
|
4196
4225
|
|
|
4197
4226
|
//#endregion
|
|
4198
|
-
//#region
|
|
4227
|
+
//#region ../../packages/seal/src/validators/methods/present-methods.ts
|
|
4199
4228
|
/**
|
|
4200
4229
|
* Marker re-exported by the validators barrel so the dts bundler keeps this
|
|
4201
4230
|
* module (and its `declare module` augmentation) in the bundled `.d.ts`.
|
|
@@ -4427,7 +4456,7 @@ BaseValidator.prototype.presentWithoutAnySiblings = function(fields, errorMessag
|
|
|
4427
4456
|
};
|
|
4428
4457
|
|
|
4429
4458
|
//#endregion
|
|
4430
|
-
//#region
|
|
4459
|
+
//#region ../../packages/seal/src/validators/methods/required-methods.ts
|
|
4431
4460
|
/**
|
|
4432
4461
|
* Marker re-exported by the validators barrel so the dts bundler keeps this
|
|
4433
4462
|
* module (and its `declare module` augmentation) in the bundled `.d.ts`.
|
|
@@ -5875,4 +5904,4 @@ Object.defineProperty(exports, 'yearRule', {
|
|
|
5875
5904
|
return yearRule;
|
|
5876
5905
|
}
|
|
5877
5906
|
});
|
|
5878
|
-
//# sourceMappingURL=required-methods-
|
|
5907
|
+
//# sourceMappingURL=required-methods-DYsRO9aZ.cjs.map
|