@warlock.js/seal 4.2.10 → 4.3.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 +17 -11
- package/LICENSE +21 -21
- package/cjs/index.cjs +26 -0
- package/cjs/index.cjs.map +1 -1
- package/esm/index.d.mts +5 -1
- package/esm/index.mjs +5 -1
- package/esm/validators/index.d.mts +4 -0
- package/esm/validators/index.mjs +4 -4
- package/esm/validators/methods/equality-conditional-methods.d.mts +7 -0
- package/esm/validators/methods/equality-conditional-methods.d.mts.map +1 -1
- package/esm/validators/methods/equality-conditional-methods.mjs +6 -1
- package/esm/validators/methods/equality-conditional-methods.mjs.map +1 -1
- package/esm/validators/methods/forbidden-methods.d.mts +8 -1
- package/esm/validators/methods/forbidden-methods.d.mts.map +1 -1
- package/esm/validators/methods/forbidden-methods.mjs +6 -1
- package/esm/validators/methods/forbidden-methods.mjs.map +1 -1
- package/esm/validators/methods/present-methods.d.mts +8 -1
- package/esm/validators/methods/present-methods.d.mts.map +1 -1
- package/esm/validators/methods/present-methods.mjs +6 -1
- package/esm/validators/methods/present-methods.mjs.map +1 -1
- package/esm/validators/methods/required-methods.d.mts +9 -0
- package/esm/validators/methods/required-methods.d.mts.map +1 -1
- package/esm/validators/methods/required-methods.mjs +8 -1
- package/esm/validators/methods/required-methods.mjs.map +1 -1
- package/package.json +2 -2
package/esm/index.d.mts
CHANGED
|
@@ -13,6 +13,10 @@ import { FileSizeOption } from "./types/file.types.mjs";
|
|
|
13
13
|
import { BaseValidator } from "./validators/base-validator.mjs";
|
|
14
14
|
import { AnyValidator } from "./validators/any-validator.mjs";
|
|
15
15
|
import { ArrayValidator } from "./validators/array-validator.mjs";
|
|
16
|
+
import { equalityConditionalMethodsApplied } from "./validators/methods/equality-conditional-methods.mjs";
|
|
17
|
+
import { forbiddenMethodsApplied } from "./validators/methods/forbidden-methods.mjs";
|
|
18
|
+
import { presentMethodsApplied } from "./validators/methods/present-methods.mjs";
|
|
19
|
+
import { requiredMethodsApplied } from "./validators/methods/required-methods.mjs";
|
|
16
20
|
import { PrimitiveValidator } from "./validators/primitive-validator.mjs";
|
|
17
21
|
import { BooleanValidator } from "./validators/boolean-validator.mjs";
|
|
18
22
|
import { ComputedCallback, ComputedValidator } from "./validators/computed-validator.mjs";
|
|
@@ -93,7 +97,7 @@ import { ValidateOptions, ValidatorV, v } from "./factory/validators.mjs";
|
|
|
93
97
|
import { validate } from "./factory/validate.mjs";
|
|
94
98
|
import { PluginContext, SealPlugin, getInstalledPlugins, hasPlugin, registerPlugin, unregisterPlugin } from "./plugins/plugin-system.mjs";
|
|
95
99
|
import { mapToStandardResult } from "./standard-schema/map-result.mjs";
|
|
96
|
-
export { AnyValidator, ArrayValidator, AttributeTranslation, BaseValidator, BooleanValidator, ComputedCallback, ComputedValidator, ContextualSchemaRule, ContextualizedMutator, ContextualizedTransformer, DateValidator, DiscriminatedUnionValidator, FileSizeOption, FloatValidator, Infer, InferInput, InferInputObjectShape, InferObjectShape, InferOutput, InferOutputObjectShape, InstanceOfValidator, IntValidator, IsInputOptionalKey, IsOptionalKey, IsOutputOptionalKey, JsonSchemaResult, JsonSchemaTarget, LazyValidator, LiteralValidator, ManagedCallback, ManagedValidator, Month, Mutator, MutatorContext, NumberValidator, NumericValidator, ObjectValidator, PluginContext, PrimitiveValidator, RecordValidator, RuleResult, RuleTranslation, ScalarValidator, Schema, SchemaContext, SchemaRule, SchemaRuleOptions, SealConfig, SealPlugin, SimpleTransformerCallback, StandardJSONSchemaV1, StandardSchemaV1, StringValidator, TransformerCallback, TranslateAttributeCallback, TranslateRuleCallback, TupleValidator, UUIDVersion, UnionValidator, VALID_RULE, ValidateOptions, ValidationAttributesList, ValidationResult, ValidatorV, WEEK_DAYS, WeekDay, WhenRuleOptions, absMutator, addDaysMutator, addHoursMutator, addMonthsMutator, addYearsMutator, afterFieldRule, afterTodayRule, ageRule, allowedValuesRule, alphaNumericRule, alphaOnlyMutator, alphaRule, alphanumericOnlyMutator, appendMutator, applyNullable, arrayRule, base64DecodeMutator, base64EncodeMutator, beforeFieldRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenAgeRule, betweenDatesRule, betweenDaysRule, betweenHoursRule, betweenLengthRule, betweenMinutesRule, betweenMonthsRule, betweenNumbersRule, betweenTimesRule, betweenYearsRule, birthdayRule, booleanMutator, booleanRule, businessDayRule, camelCaseMutator, capitalizeMutator, ceilMutator, colorRule, configureSeal, containsRule, cuidRule, darkColorRule, dateMutator, dateRule, emailRule, endsWithRule, enumRule, equalRule, equalsFieldRule, evenRule, flipArrayMutator, floatRule, floorMutator, forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule, forbiddenRule, fromHourRule, fromMinuteRule, fromTodayRule, futureRule, getFieldValue, getInstalledPlugins, getRuleOptions, getSealConfig, greaterThanRule, hasPlugin, hexColorRule, hslColorRule, htmlEscapeMutator, humanizeSize, inRule, instanceofRule, intRule, invalidRule, ip4Rule, ip6Rule, ipRule, isCreditCardRule, isDateValue, isNumericRule, jsonMutator, kebabCaseMutator, leapYearRule, lengthRule, lessThanRule, lightColorRule, literalRule, lowercaseMutator, ltrimMutator, mapToStandardResult, maskMutator, matchesRule, maxAgeRule, maxDateRule, maxDayRule, maxFileSizeRule, maxHeightRule, maxLengthRule, maxMonthRule, maxRule, maxWidthRule, maxWordsRule, maxYearRule, minAgeRule, minDateRule, minDayRule, minFileSizeRule, minHeightRule, minLengthRule, minMonthRule, minRule, minWidthRule, minWordsRule, minYearRule, moduloRule, monthRule, nanoidRule, negativeRule, notAllowedValuesRule, notContainsRule, notEqualsFieldRule, numberMutator, numberRule, numericMutator, objectRule, objectTrimMutator, oddRule, padEndMutator, padStartMutator, pascalCaseMutator, pastRule, patternRule, plainObjectRule, positiveRule, prependMutator, presentIfEmptyRule, presentIfInRule, presentIfNotEmptyRule, presentIfNotInRule, presentIfRule, presentRule, presentUnlessRule, presentWithAllRule, presentWithAnyRule, presentWithRule, presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule, quarterRule, registerPlugin, removeEmptyArrayElementsMutator, removeNumbersMutator, removeSpecialCharactersMutator, repeatMutator, replaceAllMutator, replaceMutator, requiredIfAllEmptyRule, requiredIfAllNotEmptyRule, requiredIfAnyEmptyRule, requiredIfAnyNotEmptyRule, requiredIfEmptyRule, requiredIfInRule, requiredIfNotEmptyRule, requiredIfNotInRule, requiredIfRule, requiredRule, requiredUnlessRule, requiredWhenRule, requiredWithAllRule, requiredWithAnyRule, requiredWithRule, requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule, resetSealConfig, resolveFileSize, resolveTranslation, reverseArrayMutator, reverseMutator, rgbColorRule, rgbaColorRule, roundMutator, roundNumberMutator, rtrimMutator, safeHtmlMutator, sameAsFieldDateRule, scalarRule, setKeyPath, slugMutator, snakeCaseMutator, sortArrayMutator, sortedArrayRule, startsWithRule, stringMutator, stringRule, stringifyMutator, stripUnknownMutator, strongPasswordRule, titleCaseMutator, toDateOnlyMutator, toEndOfDayMutator, toEndOfMonthMutator, toEndOfYearMutator, toFixedMutator, toFormatMutator, toISOStringMutator, toStartOfDayMutator, toStartOfMonthMutator, toStartOfYearMutator, toTimeOnlyMutator, toTimestampMutator, toUTCMutator, todayRule, trimMultipleWhitespaceMutator, trimMutator, truncateMutator, ulidRule, unescapeHtmlMutator, unionRule, uniqueArrayMutator, uniqueArrayRule, unknownKeyRule, unregisterPlugin, uppercaseMutator, urlDecodeMutator, urlEncodeMutator, urlRule, uuidRule, v, validate, weekDayRule, weekdayRule, weekdaysRule, weekendRule, whenRule, withinDaysRule, withinFutureDaysRule, withinPastDaysRule, withoutWhitespaceRule, wordsRule, wrapNullableStrict, yearRule };
|
|
100
|
+
export { AnyValidator, ArrayValidator, AttributeTranslation, BaseValidator, BooleanValidator, ComputedCallback, ComputedValidator, ContextualSchemaRule, ContextualizedMutator, ContextualizedTransformer, DateValidator, DiscriminatedUnionValidator, FileSizeOption, FloatValidator, Infer, InferInput, InferInputObjectShape, InferObjectShape, InferOutput, InferOutputObjectShape, InstanceOfValidator, IntValidator, IsInputOptionalKey, IsOptionalKey, IsOutputOptionalKey, JsonSchemaResult, JsonSchemaTarget, LazyValidator, LiteralValidator, ManagedCallback, ManagedValidator, Month, Mutator, MutatorContext, NumberValidator, NumericValidator, ObjectValidator, PluginContext, PrimitiveValidator, RecordValidator, RuleResult, RuleTranslation, ScalarValidator, Schema, SchemaContext, SchemaRule, SchemaRuleOptions, SealConfig, SealPlugin, SimpleTransformerCallback, StandardJSONSchemaV1, StandardSchemaV1, StringValidator, TransformerCallback, TranslateAttributeCallback, TranslateRuleCallback, TupleValidator, UUIDVersion, UnionValidator, VALID_RULE, ValidateOptions, ValidationAttributesList, ValidationResult, ValidatorV, WEEK_DAYS, WeekDay, WhenRuleOptions, absMutator, addDaysMutator, addHoursMutator, addMonthsMutator, addYearsMutator, afterFieldRule, afterTodayRule, ageRule, allowedValuesRule, alphaNumericRule, alphaOnlyMutator, alphaRule, alphanumericOnlyMutator, appendMutator, applyNullable, arrayRule, base64DecodeMutator, base64EncodeMutator, beforeFieldRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenAgeRule, betweenDatesRule, betweenDaysRule, betweenHoursRule, betweenLengthRule, betweenMinutesRule, betweenMonthsRule, betweenNumbersRule, betweenTimesRule, betweenYearsRule, birthdayRule, booleanMutator, booleanRule, businessDayRule, camelCaseMutator, capitalizeMutator, ceilMutator, colorRule, configureSeal, containsRule, cuidRule, darkColorRule, dateMutator, dateRule, emailRule, endsWithRule, enumRule, equalRule, equalityConditionalMethodsApplied, equalsFieldRule, evenRule, flipArrayMutator, floatRule, floorMutator, forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule, forbiddenMethodsApplied, forbiddenRule, fromHourRule, fromMinuteRule, fromTodayRule, futureRule, getFieldValue, getInstalledPlugins, getRuleOptions, getSealConfig, greaterThanRule, hasPlugin, hexColorRule, hslColorRule, htmlEscapeMutator, humanizeSize, inRule, instanceofRule, intRule, invalidRule, ip4Rule, ip6Rule, ipRule, isCreditCardRule, isDateValue, isNumericRule, jsonMutator, kebabCaseMutator, leapYearRule, lengthRule, lessThanRule, lightColorRule, literalRule, lowercaseMutator, ltrimMutator, mapToStandardResult, maskMutator, matchesRule, maxAgeRule, maxDateRule, maxDayRule, maxFileSizeRule, maxHeightRule, maxLengthRule, maxMonthRule, maxRule, maxWidthRule, maxWordsRule, maxYearRule, minAgeRule, minDateRule, minDayRule, minFileSizeRule, minHeightRule, minLengthRule, minMonthRule, minRule, minWidthRule, minWordsRule, minYearRule, moduloRule, monthRule, nanoidRule, negativeRule, notAllowedValuesRule, notContainsRule, notEqualsFieldRule, numberMutator, numberRule, numericMutator, objectRule, objectTrimMutator, oddRule, padEndMutator, padStartMutator, pascalCaseMutator, pastRule, patternRule, plainObjectRule, positiveRule, prependMutator, presentIfEmptyRule, presentIfInRule, presentIfNotEmptyRule, presentIfNotInRule, presentIfRule, presentMethodsApplied, presentRule, presentUnlessRule, presentWithAllRule, presentWithAnyRule, presentWithRule, presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule, quarterRule, registerPlugin, removeEmptyArrayElementsMutator, removeNumbersMutator, removeSpecialCharactersMutator, repeatMutator, replaceAllMutator, replaceMutator, requiredIfAllEmptyRule, requiredIfAllNotEmptyRule, requiredIfAnyEmptyRule, requiredIfAnyNotEmptyRule, requiredIfEmptyRule, requiredIfInRule, requiredIfNotEmptyRule, requiredIfNotInRule, requiredIfRule, requiredMethodsApplied, requiredRule, requiredUnlessRule, requiredWhenRule, requiredWithAllRule, requiredWithAnyRule, requiredWithRule, requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule, resetSealConfig, resolveFileSize, resolveTranslation, reverseArrayMutator, reverseMutator, rgbColorRule, rgbaColorRule, roundMutator, roundNumberMutator, rtrimMutator, safeHtmlMutator, sameAsFieldDateRule, scalarRule, setKeyPath, slugMutator, snakeCaseMutator, sortArrayMutator, sortedArrayRule, startsWithRule, stringMutator, stringRule, stringifyMutator, stripUnknownMutator, strongPasswordRule, titleCaseMutator, toDateOnlyMutator, toEndOfDayMutator, toEndOfMonthMutator, toEndOfYearMutator, toFixedMutator, toFormatMutator, toISOStringMutator, toStartOfDayMutator, toStartOfMonthMutator, toStartOfYearMutator, toTimeOnlyMutator, toTimestampMutator, toUTCMutator, todayRule, trimMultipleWhitespaceMutator, trimMutator, truncateMutator, ulidRule, unescapeHtmlMutator, unionRule, uniqueArrayMutator, uniqueArrayRule, unknownKeyRule, unregisterPlugin, uppercaseMutator, urlDecodeMutator, urlEncodeMutator, urlRule, uuidRule, v, validate, weekDayRule, weekdayRule, weekdaysRule, weekendRule, whenRule, withinDaysRule, withinFutureDaysRule, withinPastDaysRule, withoutWhitespaceRule, wordsRule, wrapNullableStrict, yearRule };
|
|
97
101
|
import "./validators/methods/equality-conditional-methods.mjs";
|
|
98
102
|
import "./validators/methods/forbidden-methods.mjs";
|
|
99
103
|
import "./validators/methods/present-methods.mjs";
|
package/esm/index.mjs
CHANGED
|
@@ -65,6 +65,10 @@ import { arrayRule, booleanRule, floatRule, intRule, numberRule, objectRule, pla
|
|
|
65
65
|
import { unknownKeyRule } from "./rules/common/unknown-key.mjs";
|
|
66
66
|
import "./rules/index.mjs";
|
|
67
67
|
import { ArrayValidator } from "./validators/array-validator.mjs";
|
|
68
|
+
import { equalityConditionalMethodsApplied } from "./validators/methods/equality-conditional-methods.mjs";
|
|
69
|
+
import { forbiddenMethodsApplied } from "./validators/methods/forbidden-methods.mjs";
|
|
70
|
+
import { presentMethodsApplied } from "./validators/methods/present-methods.mjs";
|
|
71
|
+
import { requiredMethodsApplied } from "./validators/methods/required-methods.mjs";
|
|
68
72
|
import { PrimitiveValidator } from "./validators/primitive-validator.mjs";
|
|
69
73
|
import { BooleanValidator } from "./validators/boolean-validator.mjs";
|
|
70
74
|
import { ComputedValidator } from "./validators/computed-validator.mjs";
|
|
@@ -89,4 +93,4 @@ import { v } from "./factory/validators.mjs";
|
|
|
89
93
|
import "./factory/index.mjs";
|
|
90
94
|
import { getInstalledPlugins, hasPlugin, registerPlugin, unregisterPlugin } from "./plugins/plugin-system.mjs";
|
|
91
95
|
|
|
92
|
-
export { AnyValidator, ArrayValidator, BaseValidator, BooleanValidator, ComputedValidator, DateValidator, DiscriminatedUnionValidator, FloatValidator, InstanceOfValidator, IntValidator, LazyValidator, LiteralValidator, ManagedValidator, NumberValidator, NumericValidator, ObjectValidator, PrimitiveValidator, RecordValidator, ScalarValidator, StringValidator, TupleValidator, UnionValidator, VALID_RULE, WEEK_DAYS, absMutator, addDaysMutator, addHoursMutator, addMonthsMutator, addYearsMutator, afterFieldRule, afterTodayRule, ageRule, allowedValuesRule, alphaNumericRule, alphaOnlyMutator, alphaRule, alphanumericOnlyMutator, appendMutator, applyNullable, arrayRule, base64DecodeMutator, base64EncodeMutator, beforeFieldRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenAgeRule, betweenDatesRule, betweenDaysRule, betweenHoursRule, betweenLengthRule, betweenMinutesRule, betweenMonthsRule, betweenNumbersRule, betweenTimesRule, betweenYearsRule, birthdayRule, booleanMutator, booleanRule, businessDayRule, camelCaseMutator, capitalizeMutator, ceilMutator, colorRule, configureSeal, containsRule, cuidRule, darkColorRule, dateMutator, dateRule, emailRule, endsWithRule, enumRule, equalRule, equalsFieldRule, evenRule, flipArrayMutator, floatRule, floorMutator, forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule, forbiddenRule, fromHourRule, fromMinuteRule, fromTodayRule, futureRule, getFieldValue, getInstalledPlugins, getRuleOptions, getSealConfig, greaterThanRule, hasPlugin, hexColorRule, hslColorRule, htmlEscapeMutator, humanizeSize, inRule, instanceofRule, intRule, invalidRule, ip4Rule, ip6Rule, ipRule, isCreditCardRule, isDateValue, isNumericRule, jsonMutator, kebabCaseMutator, leapYearRule, lengthRule, lessThanRule, lightColorRule, literalRule, lowercaseMutator, ltrimMutator, mapToStandardResult, maskMutator, matchesRule, maxAgeRule, maxDateRule, maxDayRule, maxFileSizeRule, maxHeightRule, maxLengthRule, maxMonthRule, maxRule, maxWidthRule, maxWordsRule, maxYearRule, minAgeRule, minDateRule, minDayRule, minFileSizeRule, minHeightRule, minLengthRule, minMonthRule, minRule, minWidthRule, minWordsRule, minYearRule, moduloRule, monthRule, nanoidRule, negativeRule, notAllowedValuesRule, notContainsRule, notEqualsFieldRule, numberMutator, numberRule, numericMutator, objectRule, objectTrimMutator, oddRule, padEndMutator, padStartMutator, pascalCaseMutator, pastRule, patternRule, plainObjectRule, positiveRule, prependMutator, presentIfEmptyRule, presentIfInRule, presentIfNotEmptyRule, presentIfNotInRule, presentIfRule, presentRule, presentUnlessRule, presentWithAllRule, presentWithAnyRule, presentWithRule, presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule, quarterRule, registerPlugin, removeEmptyArrayElementsMutator, removeNumbersMutator, removeSpecialCharactersMutator, repeatMutator, replaceAllMutator, replaceMutator, requiredIfAllEmptyRule, requiredIfAllNotEmptyRule, requiredIfAnyEmptyRule, requiredIfAnyNotEmptyRule, requiredIfEmptyRule, requiredIfInRule, requiredIfNotEmptyRule, requiredIfNotInRule, requiredIfRule, requiredRule, requiredUnlessRule, requiredWhenRule, requiredWithAllRule, requiredWithAnyRule, requiredWithRule, requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule, resetSealConfig, resolveFileSize, resolveTranslation, reverseArrayMutator, reverseMutator, rgbColorRule, rgbaColorRule, roundMutator, roundNumberMutator, rtrimMutator, safeHtmlMutator, sameAsFieldDateRule, scalarRule, setKeyPath, slugMutator, snakeCaseMutator, sortArrayMutator, sortedArrayRule, startsWithRule, stringMutator, stringRule, stringifyMutator, stripUnknownMutator, strongPasswordRule, titleCaseMutator, toDateOnlyMutator, toEndOfDayMutator, toEndOfMonthMutator, toEndOfYearMutator, toFixedMutator, toFormatMutator, toISOStringMutator, toStartOfDayMutator, toStartOfMonthMutator, toStartOfYearMutator, toTimeOnlyMutator, toTimestampMutator, toUTCMutator, todayRule, trimMultipleWhitespaceMutator, trimMutator, truncateMutator, ulidRule, unescapeHtmlMutator, unionRule, uniqueArrayMutator, uniqueArrayRule, unknownKeyRule, unregisterPlugin, uppercaseMutator, urlDecodeMutator, urlEncodeMutator, urlRule, uuidRule, v, validate, weekDayRule, weekdayRule, weekdaysRule, weekendRule, whenRule, withinDaysRule, withinFutureDaysRule, withinPastDaysRule, withoutWhitespaceRule, wordsRule, wrapNullableStrict, yearRule };
|
|
96
|
+
export { AnyValidator, ArrayValidator, BaseValidator, BooleanValidator, ComputedValidator, DateValidator, DiscriminatedUnionValidator, FloatValidator, InstanceOfValidator, IntValidator, LazyValidator, LiteralValidator, ManagedValidator, NumberValidator, NumericValidator, ObjectValidator, PrimitiveValidator, RecordValidator, ScalarValidator, StringValidator, TupleValidator, UnionValidator, VALID_RULE, WEEK_DAYS, absMutator, addDaysMutator, addHoursMutator, addMonthsMutator, addYearsMutator, afterFieldRule, afterTodayRule, ageRule, allowedValuesRule, alphaNumericRule, alphaOnlyMutator, alphaRule, alphanumericOnlyMutator, appendMutator, applyNullable, arrayRule, base64DecodeMutator, base64EncodeMutator, beforeFieldRule, beforeHourRule, beforeMinuteRule, beforeTodayRule, betweenAgeRule, betweenDatesRule, betweenDaysRule, betweenHoursRule, betweenLengthRule, betweenMinutesRule, betweenMonthsRule, betweenNumbersRule, betweenTimesRule, betweenYearsRule, birthdayRule, booleanMutator, booleanRule, businessDayRule, camelCaseMutator, capitalizeMutator, ceilMutator, colorRule, configureSeal, containsRule, cuidRule, darkColorRule, dateMutator, dateRule, emailRule, endsWithRule, enumRule, equalRule, equalityConditionalMethodsApplied, equalsFieldRule, evenRule, flipArrayMutator, floatRule, floorMutator, forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbiddenIfNotInRule, forbiddenIfNotRule, forbiddenIfRule, forbiddenMethodsApplied, forbiddenRule, fromHourRule, fromMinuteRule, fromTodayRule, futureRule, getFieldValue, getInstalledPlugins, getRuleOptions, getSealConfig, greaterThanRule, hasPlugin, hexColorRule, hslColorRule, htmlEscapeMutator, humanizeSize, inRule, instanceofRule, intRule, invalidRule, ip4Rule, ip6Rule, ipRule, isCreditCardRule, isDateValue, isNumericRule, jsonMutator, kebabCaseMutator, leapYearRule, lengthRule, lessThanRule, lightColorRule, literalRule, lowercaseMutator, ltrimMutator, mapToStandardResult, maskMutator, matchesRule, maxAgeRule, maxDateRule, maxDayRule, maxFileSizeRule, maxHeightRule, maxLengthRule, maxMonthRule, maxRule, maxWidthRule, maxWordsRule, maxYearRule, minAgeRule, minDateRule, minDayRule, minFileSizeRule, minHeightRule, minLengthRule, minMonthRule, minRule, minWidthRule, minWordsRule, minYearRule, moduloRule, monthRule, nanoidRule, negativeRule, notAllowedValuesRule, notContainsRule, notEqualsFieldRule, numberMutator, numberRule, numericMutator, objectRule, objectTrimMutator, oddRule, padEndMutator, padStartMutator, pascalCaseMutator, pastRule, patternRule, plainObjectRule, positiveRule, prependMutator, presentIfEmptyRule, presentIfInRule, presentIfNotEmptyRule, presentIfNotInRule, presentIfRule, presentMethodsApplied, presentRule, presentUnlessRule, presentWithAllRule, presentWithAnyRule, presentWithRule, presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule, quarterRule, registerPlugin, removeEmptyArrayElementsMutator, removeNumbersMutator, removeSpecialCharactersMutator, repeatMutator, replaceAllMutator, replaceMutator, requiredIfAllEmptyRule, requiredIfAllNotEmptyRule, requiredIfAnyEmptyRule, requiredIfAnyNotEmptyRule, requiredIfEmptyRule, requiredIfInRule, requiredIfNotEmptyRule, requiredIfNotInRule, requiredIfRule, requiredMethodsApplied, requiredRule, requiredUnlessRule, requiredWhenRule, requiredWithAllRule, requiredWithAnyRule, requiredWithRule, requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule, resetSealConfig, resolveFileSize, resolveTranslation, reverseArrayMutator, reverseMutator, rgbColorRule, rgbaColorRule, roundMutator, roundNumberMutator, rtrimMutator, safeHtmlMutator, sameAsFieldDateRule, scalarRule, setKeyPath, slugMutator, snakeCaseMutator, sortArrayMutator, sortedArrayRule, startsWithRule, stringMutator, stringRule, stringifyMutator, stripUnknownMutator, strongPasswordRule, titleCaseMutator, toDateOnlyMutator, toEndOfDayMutator, toEndOfMonthMutator, toEndOfYearMutator, toFixedMutator, toFormatMutator, toISOStringMutator, toStartOfDayMutator, toStartOfMonthMutator, toStartOfYearMutator, toTimeOnlyMutator, toTimestampMutator, toUTCMutator, todayRule, trimMultipleWhitespaceMutator, trimMutator, truncateMutator, ulidRule, unescapeHtmlMutator, unionRule, uniqueArrayMutator, uniqueArrayRule, unknownKeyRule, unregisterPlugin, uppercaseMutator, urlDecodeMutator, urlEncodeMutator, urlRule, uuidRule, v, validate, weekDayRule, weekdayRule, weekdaysRule, weekendRule, whenRule, withinDaysRule, withinFutureDaysRule, withinPastDaysRule, withoutWhitespaceRule, wordsRule, wrapNullableStrict, yearRule };
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { BaseValidator } from "./base-validator.mjs";
|
|
2
2
|
import { AnyValidator } from "./any-validator.mjs";
|
|
3
3
|
import { ArrayValidator } from "./array-validator.mjs";
|
|
4
|
+
import { equalityConditionalMethodsApplied } from "./methods/equality-conditional-methods.mjs";
|
|
5
|
+
import { forbiddenMethodsApplied } from "./methods/forbidden-methods.mjs";
|
|
6
|
+
import { presentMethodsApplied } from "./methods/present-methods.mjs";
|
|
7
|
+
import { requiredMethodsApplied } from "./methods/required-methods.mjs";
|
|
4
8
|
import { PrimitiveValidator } from "./primitive-validator.mjs";
|
|
5
9
|
import { BooleanValidator } from "./boolean-validator.mjs";
|
|
6
10
|
import { ComputedCallback, ComputedValidator } from "./computed-validator.mjs";
|
package/esm/validators/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BaseValidator } from "./base-validator.mjs";
|
|
2
2
|
import { AnyValidator } from "./any-validator.mjs";
|
|
3
3
|
import { ArrayValidator } from "./array-validator.mjs";
|
|
4
|
-
import "./methods/equality-conditional-methods.mjs";
|
|
5
|
-
import "./methods/forbidden-methods.mjs";
|
|
6
|
-
import "./methods/present-methods.mjs";
|
|
7
|
-
import "./methods/required-methods.mjs";
|
|
4
|
+
import { equalityConditionalMethodsApplied } from "./methods/equality-conditional-methods.mjs";
|
|
5
|
+
import { forbiddenMethodsApplied } from "./methods/forbidden-methods.mjs";
|
|
6
|
+
import { presentMethodsApplied } from "./methods/present-methods.mjs";
|
|
7
|
+
import { requiredMethodsApplied } from "./methods/required-methods.mjs";
|
|
8
8
|
import { PrimitiveValidator } from "./primitive-validator.mjs";
|
|
9
9
|
import { BooleanValidator } from "./boolean-validator.mjs";
|
|
10
10
|
import { ComputedValidator } from "./computed-validator.mjs";
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { WhenRuleOptions } from "../../types/conditional-types.mjs";
|
|
2
2
|
|
|
3
3
|
//#region ../@warlock.js/seal/src/validators/methods/equality-conditional-methods.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Marker re-exported by the validators barrel so the dts bundler keeps this
|
|
6
|
+
* module (and its `declare module` augmentation) in the bundled `.d.ts`.
|
|
7
|
+
*/
|
|
8
|
+
declare const equalityConditionalMethodsApplied = true;
|
|
4
9
|
declare module "../base-validator.mjs" {
|
|
5
10
|
interface BaseValidator {
|
|
6
11
|
/**
|
|
@@ -87,4 +92,6 @@ declare module "../base-validator.mjs" {
|
|
|
87
92
|
whenSibling(siblingField: string, options: Omit<WhenRuleOptions, "field" | "scope">): this;
|
|
88
93
|
}
|
|
89
94
|
} //# sourceMappingURL=equality-conditional-methods.d.ts.map
|
|
95
|
+
//#endregion
|
|
96
|
+
export { equalityConditionalMethodsApplied };
|
|
90
97
|
//# sourceMappingURL=equality-conditional-methods.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equality-conditional-methods.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/equality-conditional-methods.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"equality-conditional-methods.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/equality-conditional-methods.ts"],"mappings":";;;;;AAUA;;cAAa,iCAAA;AAAA;EAAA,UAGD,aAAA;IAH0C;;;IAOlD,KAAA,CAAM,KAAA,OAAY,YAAA;IA0DW;;;IArD7B,MAAA,CAAO,KAAA,UAAe,YAAA;IA+EyB;;;IA1E/C,aAAA,CAAc,KAAA,UAAe,YAAA;IAVX;;;IAelB,aAAA,CAAc,KAAA,UAAe,YAAA;IAL7B;;;IAUA,oBAAA,CAAqB,KAAA,UAAe,YAAA;IALtB;;;;;;;;;;;;;;;;;AAqEqE;;;;;;;;;;;;;;;;;;;IA1BnF,IAAA,CAAK,KAAA,UAAe,OAAA,EAAS,IAAA,CAAK,eAAA;;;;;;;;;;;;;;;;;;;;;;;;;IA0BlC,WAAA,CAAY,YAAA,UAAsB,OAAA,EAAS,IAAA,CAAK,eAAA;EAAA;AAAA"}
|
|
@@ -6,6 +6,11 @@ import "../../rules/index.mjs";
|
|
|
6
6
|
|
|
7
7
|
//#region ../@warlock.js/seal/src/validators/methods/equality-conditional-methods.ts
|
|
8
8
|
/**
|
|
9
|
+
* Marker re-exported by the validators barrel so the dts bundler keeps this
|
|
10
|
+
* module (and its `declare module` augmentation) in the bundled `.d.ts`.
|
|
11
|
+
*/
|
|
12
|
+
const equalityConditionalMethodsApplied = true;
|
|
13
|
+
/**
|
|
9
14
|
* Value must be equal to the given value
|
|
10
15
|
*/
|
|
11
16
|
BaseValidator.prototype.equal = function(value, errorMessage) {
|
|
@@ -125,5 +130,5 @@ BaseValidator.prototype.whenSibling = function(siblingField, options) {
|
|
|
125
130
|
};
|
|
126
131
|
|
|
127
132
|
//#endregion
|
|
128
|
-
export {
|
|
133
|
+
export { equalityConditionalMethodsApplied };
|
|
129
134
|
//# sourceMappingURL=equality-conditional-methods.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equality-conditional-methods.mjs","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/equality-conditional-methods.ts"],"sourcesContent":["import { equalsFieldRule, notEqualsFieldRule } from \"../../rules\";\r\nimport { equalRule } from \"../../rules/core/equal\";\r\nimport { whenRule } from \"../../rules/core/when\";\r\nimport type { WhenRuleOptions } from \"../../types\";\r\nimport { BaseValidator } from \"../base-validator\";\r\n\r\ndeclare module \"../base-validator\" {\r\n interface BaseValidator {\r\n /**\r\n * Value must be equal to the given value\r\n */\r\n equal(value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Value must be the same as another field's value\r\n */\r\n sameAs(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value must be the same as another sibling field's value\r\n */\r\n sameAsSibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value must be different from another field's value\r\n */\r\n differentFrom(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value must be different from another sibling field's value\r\n */\r\n differentFromSibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Apply different validation rules based on another field's value (global scope)\r\n *\r\n * Use this when you need to apply completely different validators\r\n * based on another field's value (not just required/optional).\r\n *\r\n * @param field - Field name to check (can be nested with dot notation)\r\n * @param options - Validation options per field value\r\n *\r\n * @example\r\n * ```ts\r\n * // Different allowed values based on user type\r\n * v.object({\r\n * userType: v.string().in(['admin', 'user']),\r\n * role: v.string().when('userType', {\r\n * is: {\r\n * admin: v.string().in(['super', 'moderator']),\r\n * user: v.string().in(['member', 'guest'])\r\n * },\r\n * otherwise: v.string().optional()\r\n * })\r\n * })\r\n *\r\n * // Different validation rules based on type\r\n * v.object({\r\n * contactType: v.string().in(['email', 'phone']),\r\n * contact: v.string().when('contactType', {\r\n * is: {\r\n * email: v.string().email(),\r\n * phone: v.string().pattern(/^\\d{10}$/)\r\n * }\r\n * })\r\n * })\r\n * ```\r\n * @category Conditional Validation\r\n */\r\n when(field: string, options: Omit<WhenRuleOptions, \"field\" | \"scope\">): this;\r\n\r\n /**\r\n * Apply different validation rules based on sibling field's value\r\n *\r\n * Use this for nested objects where you need to check a field\r\n * within the same parent object.\r\n *\r\n * @param siblingField - Sibling field name to check\r\n * @param options - Validation options per field value\r\n *\r\n * @example\r\n * ```ts\r\n * // Array of users with role-based permissions\r\n * v.array(v.object({\r\n * userType: v.string().in(['admin', 'user']),\r\n * permissions: v.string().whenSibling('userType', {\r\n * is: {\r\n * admin: v.string().in(['read', 'write', 'delete']),\r\n * user: v.string().in(['read'])\r\n * }\r\n * })\r\n * }))\r\n * ```\r\n * @category Conditional Validation\r\n */\r\n whenSibling(siblingField: string, options: Omit<WhenRuleOptions, \"field\" | \"scope\">): this;\r\n }\r\n}\r\n\r\n/**\r\n * Value must be equal to the given value\r\n */\r\nBaseValidator.prototype.equal = function (value: any, errorMessage?: string) {\r\n return this.addRule(equalRule, errorMessage, { value });\r\n};\r\n\r\n/**\r\n * Value must be the same as another field's value\r\n */\r\nBaseValidator.prototype.sameAs = function (field: string, errorMessage?: string) {\r\n return this.addRule(equalsFieldRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value must be the same as another sibling field's value\r\n */\r\nBaseValidator.prototype.sameAsSibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(equalsFieldRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Value must be different from another field's value\r\n */\r\nBaseValidator.prototype.differentFrom = function (field: string, errorMessage?: string) {\r\n return this.addRule(notEqualsFieldRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value must be different from another sibling field's value\r\n */\r\nBaseValidator.prototype.differentFromSibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(notEqualsFieldRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Apply different validation rules based on another field's value (global scope)\r\n *\r\n * Use this when you need to apply completely different validators\r\n * based on another field's value (not just required/optional).\r\n *\r\n * @param field - Field name to check (can be nested with dot notation)\r\n * @param options - Validation options per field value\r\n *\r\n * @example\r\n * ```ts\r\n * // Different allowed values based on user type\r\n * v.object({\r\n * userType: v.string().in(['admin', 'user']),\r\n * role: v.string().when('userType', {\r\n * is: {\r\n * admin: v.string().in(['super', 'moderator']),\r\n * user: v.string().in(['member', 'guest'])\r\n * },\r\n * otherwise: v.string().optional()\r\n * })\r\n * })\r\n *\r\n * // Different validation rules based on type\r\n * v.object({\r\n * contactType: v.string().in(['email', 'phone']),\r\n * contact: v.string().when('contactType', {\r\n * is: {\r\n * email: v.string().email(),\r\n * phone: v.string().pattern(/^\\d{10}$/)\r\n * }\r\n * })\r\n * })\r\n * ```\r\n * @category Conditional Validation\r\n */\r\nBaseValidator.prototype.when = function (\r\n field: string,\r\n options: Omit<WhenRuleOptions, \"field\" | \"scope\">,\r\n) {\r\n return this.addRule(whenRule, undefined, {\r\n field,\r\n is: options.is,\r\n otherwise: options.otherwise,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Apply different validation rules based on sibling field's value\r\n *\r\n * Use this for nested objects where you need to check a field\r\n * within the same parent object.\r\n *\r\n * @param siblingField - Sibling field name to check\r\n * @param options - Validation options per field value\r\n *\r\n * @example\r\n * ```ts\r\n * // Array of users with role-based permissions\r\n * v.array(v.object({\r\n * userType: v.string().in(['admin', 'user']),\r\n * permissions: v.string().whenSibling('userType', {\r\n * is: {\r\n * admin: v.string().in(['read', 'write', 'delete']),\r\n * user: v.string().in(['read'])\r\n * }\r\n * })\r\n * }))\r\n * ```\r\n * @category Conditional Validation\r\n */\r\nBaseValidator.prototype.whenSibling = function (\r\n siblingField: string,\r\n options: Omit<WhenRuleOptions, \"field\" | \"scope\">,\r\n) {\r\n return this.addRule(whenRule, undefined, {\r\n field: siblingField,\r\n is: options.is,\r\n otherwise: options.otherwise,\r\n scope: \"sibling\",\r\n });\r\n};\r\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"equality-conditional-methods.mjs","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/equality-conditional-methods.ts"],"sourcesContent":["import { equalsFieldRule, notEqualsFieldRule } from \"../../rules\";\r\nimport { equalRule } from \"../../rules/core/equal\";\r\nimport { whenRule } from \"../../rules/core/when\";\r\nimport type { WhenRuleOptions } from \"../../types\";\r\nimport { BaseValidator } from \"../base-validator\";\r\n\r\n/**\r\n * Marker re-exported by the validators barrel so the dts bundler keeps this\r\n * module (and its `declare module` augmentation) in the bundled `.d.ts`.\r\n */\r\nexport const equalityConditionalMethodsApplied = true;\r\n\r\ndeclare module \"../base-validator\" {\r\n interface BaseValidator {\r\n /**\r\n * Value must be equal to the given value\r\n */\r\n equal(value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Value must be the same as another field's value\r\n */\r\n sameAs(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value must be the same as another sibling field's value\r\n */\r\n sameAsSibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value must be different from another field's value\r\n */\r\n differentFrom(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value must be different from another sibling field's value\r\n */\r\n differentFromSibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Apply different validation rules based on another field's value (global scope)\r\n *\r\n * Use this when you need to apply completely different validators\r\n * based on another field's value (not just required/optional).\r\n *\r\n * @param field - Field name to check (can be nested with dot notation)\r\n * @param options - Validation options per field value\r\n *\r\n * @example\r\n * ```ts\r\n * // Different allowed values based on user type\r\n * v.object({\r\n * userType: v.string().in(['admin', 'user']),\r\n * role: v.string().when('userType', {\r\n * is: {\r\n * admin: v.string().in(['super', 'moderator']),\r\n * user: v.string().in(['member', 'guest'])\r\n * },\r\n * otherwise: v.string().optional()\r\n * })\r\n * })\r\n *\r\n * // Different validation rules based on type\r\n * v.object({\r\n * contactType: v.string().in(['email', 'phone']),\r\n * contact: v.string().when('contactType', {\r\n * is: {\r\n * email: v.string().email(),\r\n * phone: v.string().pattern(/^\\d{10}$/)\r\n * }\r\n * })\r\n * })\r\n * ```\r\n * @category Conditional Validation\r\n */\r\n when(field: string, options: Omit<WhenRuleOptions, \"field\" | \"scope\">): this;\r\n\r\n /**\r\n * Apply different validation rules based on sibling field's value\r\n *\r\n * Use this for nested objects where you need to check a field\r\n * within the same parent object.\r\n *\r\n * @param siblingField - Sibling field name to check\r\n * @param options - Validation options per field value\r\n *\r\n * @example\r\n * ```ts\r\n * // Array of users with role-based permissions\r\n * v.array(v.object({\r\n * userType: v.string().in(['admin', 'user']),\r\n * permissions: v.string().whenSibling('userType', {\r\n * is: {\r\n * admin: v.string().in(['read', 'write', 'delete']),\r\n * user: v.string().in(['read'])\r\n * }\r\n * })\r\n * }))\r\n * ```\r\n * @category Conditional Validation\r\n */\r\n whenSibling(siblingField: string, options: Omit<WhenRuleOptions, \"field\" | \"scope\">): this;\r\n }\r\n}\r\n\r\n/**\r\n * Value must be equal to the given value\r\n */\r\nBaseValidator.prototype.equal = function (value: any, errorMessage?: string) {\r\n return this.addRule(equalRule, errorMessage, { value });\r\n};\r\n\r\n/**\r\n * Value must be the same as another field's value\r\n */\r\nBaseValidator.prototype.sameAs = function (field: string, errorMessage?: string) {\r\n return this.addRule(equalsFieldRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value must be the same as another sibling field's value\r\n */\r\nBaseValidator.prototype.sameAsSibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(equalsFieldRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Value must be different from another field's value\r\n */\r\nBaseValidator.prototype.differentFrom = function (field: string, errorMessage?: string) {\r\n return this.addRule(notEqualsFieldRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value must be different from another sibling field's value\r\n */\r\nBaseValidator.prototype.differentFromSibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(notEqualsFieldRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Apply different validation rules based on another field's value (global scope)\r\n *\r\n * Use this when you need to apply completely different validators\r\n * based on another field's value (not just required/optional).\r\n *\r\n * @param field - Field name to check (can be nested with dot notation)\r\n * @param options - Validation options per field value\r\n *\r\n * @example\r\n * ```ts\r\n * // Different allowed values based on user type\r\n * v.object({\r\n * userType: v.string().in(['admin', 'user']),\r\n * role: v.string().when('userType', {\r\n * is: {\r\n * admin: v.string().in(['super', 'moderator']),\r\n * user: v.string().in(['member', 'guest'])\r\n * },\r\n * otherwise: v.string().optional()\r\n * })\r\n * })\r\n *\r\n * // Different validation rules based on type\r\n * v.object({\r\n * contactType: v.string().in(['email', 'phone']),\r\n * contact: v.string().when('contactType', {\r\n * is: {\r\n * email: v.string().email(),\r\n * phone: v.string().pattern(/^\\d{10}$/)\r\n * }\r\n * })\r\n * })\r\n * ```\r\n * @category Conditional Validation\r\n */\r\nBaseValidator.prototype.when = function (\r\n field: string,\r\n options: Omit<WhenRuleOptions, \"field\" | \"scope\">,\r\n) {\r\n return this.addRule(whenRule, undefined, {\r\n field,\r\n is: options.is,\r\n otherwise: options.otherwise,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Apply different validation rules based on sibling field's value\r\n *\r\n * Use this for nested objects where you need to check a field\r\n * within the same parent object.\r\n *\r\n * @param siblingField - Sibling field name to check\r\n * @param options - Validation options per field value\r\n *\r\n * @example\r\n * ```ts\r\n * // Array of users with role-based permissions\r\n * v.array(v.object({\r\n * userType: v.string().in(['admin', 'user']),\r\n * permissions: v.string().whenSibling('userType', {\r\n * is: {\r\n * admin: v.string().in(['read', 'write', 'delete']),\r\n * user: v.string().in(['read'])\r\n * }\r\n * })\r\n * }))\r\n * ```\r\n * @category Conditional Validation\r\n */\r\nBaseValidator.prototype.whenSibling = function (\r\n siblingField: string,\r\n options: Omit<WhenRuleOptions, \"field\" | \"scope\">,\r\n) {\r\n return this.addRule(whenRule, undefined, {\r\n field: siblingField,\r\n is: options.is,\r\n otherwise: options.otherwise,\r\n scope: \"sibling\",\r\n });\r\n};\r\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,oCAAoC;;;;AAkGjD,cAAc,UAAU,QAAQ,SAAU,OAAY,cAAuB;CAC3E,OAAO,KAAK,QAAQ,WAAW,cAAc,EAAE,MAAM,CAAC;AACxD;;;;AAKA,cAAc,UAAU,SAAS,SAAU,OAAe,cAAuB;CAC/E,OAAO,KAAK,QAAQ,iBAAiB,cAAc;EACjD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,gBAAgB,SAAU,OAAe,cAAuB;CACtF,OAAO,KAAK,QAAQ,iBAAiB,cAAc;EACjD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,gBAAgB,SAAU,OAAe,cAAuB;CACtF,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,uBAAuB,SAAU,OAAe,cAAuB;CAC7F,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA,OAAO;CACT,CAAC;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,cAAc,UAAU,OAAO,SAC7B,OACA,SACA;CACA,OAAO,KAAK,QAAQ,UAAU,QAAW;EACvC;EACA,IAAI,QAAQ;EACZ,WAAW,QAAQ;EACnB,OAAO;CACT,CAAC;AACH;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,cAAc,UAAU,cAAc,SACpC,cACA,SACA;CACA,OAAO,KAAK,QAAQ,UAAU,QAAW;EACvC,OAAO;EACP,IAAI,QAAQ;EACZ,WAAW,QAAQ;EACnB,OAAO;CACT,CAAC;AACH"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
//#region ../@warlock.js/seal/src/validators/methods/forbidden-methods.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Marker re-exported by the validators barrel so the dts bundler keeps this
|
|
4
|
+
* module (and its `declare module` augmentation) in the bundled `.d.ts`.
|
|
5
|
+
*/
|
|
6
|
+
declare const forbiddenMethodsApplied = true;
|
|
2
7
|
declare module "../base-validator.mjs" {
|
|
3
8
|
interface BaseValidator {
|
|
4
9
|
/**
|
|
@@ -54,5 +59,7 @@ declare module "../base-validator.mjs" {
|
|
|
54
59
|
*/
|
|
55
60
|
forbiddenIfNotInSibling(field: string, values: any[], errorMessage?: string): this;
|
|
56
61
|
}
|
|
57
|
-
}
|
|
62
|
+
} //# sourceMappingURL=forbidden-methods.d.ts.map
|
|
63
|
+
//#endregion
|
|
64
|
+
export { forbiddenMethodsApplied };
|
|
58
65
|
//# sourceMappingURL=forbidden-methods.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forbidden-methods.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/forbidden-methods.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"forbidden-methods.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/forbidden-methods.ts"],"mappings":";;AAeA;;;cAAa,uBAAA;AAAA;EAAA,UAGD,aAAA;IAHgC;;;IAOxC,SAAA,CAAU,YAAA;IAAV;;;IAKA,WAAA,CAAY,KAAA,UAAe,KAAA,OAAY,YAAA;IAAZ;;;IAK3B,kBAAA,CAAmB,KAAA,UAAe,KAAA,OAAY,YAAA;IAAZ;;;IAKlC,cAAA,CAAe,KAAA,UAAe,KAAA,OAAY,YAAA;IAAZ;;;IAK9B,qBAAA,CAAsB,KAAA,UAAe,KAAA,OAAY,YAAA;IAAZ;;;IAKrC,gBAAA,CAAiB,KAAA,UAAe,YAAA;IAAA;;;IAKhC,uBAAA,CAAwB,KAAA,UAAe,YAAA;IAKvC;;;IAAA,mBAAA,CAAoB,KAAA,UAAe,YAAA;IAKR;;;IAA3B,0BAAA,CAA2B,KAAA,UAAe,YAAA;IAKb;;;IAA7B,aAAA,CAAc,KAAA,UAAe,MAAA,SAAe,YAAA;IAKR;;;IAApC,oBAAA,CAAqB,KAAA,UAAe,MAAA,SAAe,YAAA;IAKnB;;;IAAhC,gBAAA,CAAiB,KAAA,UAAe,MAAA,SAAe,YAAA;IAKR;;;IAAvC,uBAAA,CAAwB,KAAA,UAAe,MAAA,SAAe,YAAA;EAAA;AAAA"}
|
|
@@ -4,6 +4,11 @@ import { forbiddenIfEmptyRule, forbiddenIfInRule, forbiddenIfNotEmptyRule, forbi
|
|
|
4
4
|
|
|
5
5
|
//#region ../@warlock.js/seal/src/validators/methods/forbidden-methods.ts
|
|
6
6
|
/**
|
|
7
|
+
* Marker re-exported by the validators barrel so the dts bundler keeps this
|
|
8
|
+
* module (and its `declare module` augmentation) in the bundled `.d.ts`.
|
|
9
|
+
*/
|
|
10
|
+
const forbiddenMethodsApplied = true;
|
|
11
|
+
/**
|
|
7
12
|
* Value is forbidden to be present
|
|
8
13
|
*/
|
|
9
14
|
BaseValidator.prototype.forbidden = function(errorMessage) {
|
|
@@ -127,5 +132,5 @@ BaseValidator.prototype.forbiddenIfNotInSibling = function(field, values, errorM
|
|
|
127
132
|
};
|
|
128
133
|
|
|
129
134
|
//#endregion
|
|
130
|
-
export {
|
|
135
|
+
export { forbiddenMethodsApplied };
|
|
131
136
|
//# sourceMappingURL=forbidden-methods.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forbidden-methods.mjs","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/forbidden-methods.ts"],"sourcesContent":["import {\r\n forbiddenIfEmptyRule,\r\n forbiddenIfInRule,\r\n forbiddenIfNotEmptyRule,\r\n forbiddenIfNotInRule,\r\n forbiddenIfNotRule,\r\n forbiddenIfRule,\r\n} from \"../../rules/conditional/forbidden-if-rules\";\r\nimport { forbiddenRule } from \"../../rules/core/forbidden\";\r\nimport { BaseValidator } from \"../base-validator\";\r\n\r\ndeclare module \"../base-validator\" {\r\n interface BaseValidator {\r\n /**\r\n * Value is forbidden to be present\r\n */\r\n forbidden(errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field equals a specific value (global scope)\r\n */\r\n forbiddenIf(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field equals a specific value (sibling scope)\r\n */\r\n forbiddenIfSibling(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field does NOT equal a specific value (global scope)\r\n */\r\n forbiddenIfNot(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field does NOT equal a specific value (sibling scope)\r\n */\r\n forbiddenIfNotSibling(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field is empty (global scope)\r\n */\r\n forbiddenIfEmpty(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field is empty (sibling scope)\r\n */\r\n forbiddenIfEmptySibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field is not empty (global scope)\r\n */\r\n forbiddenIfNotEmpty(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field is not empty (sibling scope)\r\n */\r\n forbiddenIfNotEmptySibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field's value is in the given array (global scope)\r\n */\r\n forbiddenIfIn(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field's value is in the given array (sibling scope)\r\n */\r\n forbiddenIfInSibling(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field's value is NOT in the given array (global scope)\r\n */\r\n forbiddenIfNotIn(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field's value is NOT in the given array (sibling scope)\r\n */\r\n forbiddenIfNotInSibling(field: string, values: any[], errorMessage?: string): this;\r\n }\r\n}\r\n\r\n/**\r\n * Value is forbidden to be present\r\n */\r\nBaseValidator.prototype.forbidden = function (errorMessage?: string) {\r\n return this.addRule(forbiddenRule, errorMessage);\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field equals a specific value (global scope)\r\n */\r\nBaseValidator.prototype.forbiddenIf = function (field: string, value: any, errorMessage?: string) {\r\n return this.addRule(forbiddenIfRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field equals a specific value (sibling scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfSibling = function (\r\n field: string,\r\n value: any,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field does NOT equal a specific value (global scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfNot = function (\r\n field: string,\r\n value: any,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfNotRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field does NOT equal a specific value (sibling scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfNotSibling = function (\r\n field: string,\r\n value: any,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfNotRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field is empty (global scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfEmpty = function (field: string, errorMessage?: string) {\r\n return this.addRule(forbiddenIfEmptyRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field is empty (sibling scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfEmptySibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(forbiddenIfEmptyRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field is not empty (global scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfNotEmpty = function (field: string, errorMessage?: string) {\r\n return this.addRule(forbiddenIfNotEmptyRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field is not empty (sibling scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfNotEmptySibling = function (\r\n field: string,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfNotEmptyRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field's value is in the given array (global scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfIn = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field's value is in the given array (sibling scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfInSibling = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field's value is NOT in the given array (global scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfNotIn = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfNotInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field's value is NOT in the given array (sibling scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfNotInSibling = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfNotInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"sibling\",\r\n });\r\n};\r\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"forbidden-methods.mjs","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/forbidden-methods.ts"],"sourcesContent":["import {\r\n forbiddenIfEmptyRule,\r\n forbiddenIfInRule,\r\n forbiddenIfNotEmptyRule,\r\n forbiddenIfNotInRule,\r\n forbiddenIfNotRule,\r\n forbiddenIfRule,\r\n} from \"../../rules/conditional/forbidden-if-rules\";\r\nimport { forbiddenRule } from \"../../rules/core/forbidden\";\r\nimport { BaseValidator } from \"../base-validator\";\r\n\r\n/**\r\n * Marker re-exported by the validators barrel so the dts bundler keeps this\r\n * module (and its `declare module` augmentation) in the bundled `.d.ts`.\r\n */\r\nexport const forbiddenMethodsApplied = true;\r\n\r\ndeclare module \"../base-validator\" {\r\n interface BaseValidator {\r\n /**\r\n * Value is forbidden to be present\r\n */\r\n forbidden(errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field equals a specific value (global scope)\r\n */\r\n forbiddenIf(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field equals a specific value (sibling scope)\r\n */\r\n forbiddenIfSibling(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field does NOT equal a specific value (global scope)\r\n */\r\n forbiddenIfNot(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field does NOT equal a specific value (sibling scope)\r\n */\r\n forbiddenIfNotSibling(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field is empty (global scope)\r\n */\r\n forbiddenIfEmpty(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field is empty (sibling scope)\r\n */\r\n forbiddenIfEmptySibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field is not empty (global scope)\r\n */\r\n forbiddenIfNotEmpty(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field is not empty (sibling scope)\r\n */\r\n forbiddenIfNotEmptySibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field's value is in the given array (global scope)\r\n */\r\n forbiddenIfIn(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field's value is in the given array (sibling scope)\r\n */\r\n forbiddenIfInSibling(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field's value is NOT in the given array (global scope)\r\n */\r\n forbiddenIfNotIn(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Value is forbidden if another field's value is NOT in the given array (sibling scope)\r\n */\r\n forbiddenIfNotInSibling(field: string, values: any[], errorMessage?: string): this;\r\n }\r\n}\r\n\r\n/**\r\n * Value is forbidden to be present\r\n */\r\nBaseValidator.prototype.forbidden = function (errorMessage?: string) {\r\n return this.addRule(forbiddenRule, errorMessage);\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field equals a specific value (global scope)\r\n */\r\nBaseValidator.prototype.forbiddenIf = function (field: string, value: any, errorMessage?: string) {\r\n return this.addRule(forbiddenIfRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field equals a specific value (sibling scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfSibling = function (\r\n field: string,\r\n value: any,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field does NOT equal a specific value (global scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfNot = function (\r\n field: string,\r\n value: any,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfNotRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field does NOT equal a specific value (sibling scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfNotSibling = function (\r\n field: string,\r\n value: any,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfNotRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field is empty (global scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfEmpty = function (field: string, errorMessage?: string) {\r\n return this.addRule(forbiddenIfEmptyRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field is empty (sibling scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfEmptySibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(forbiddenIfEmptyRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field is not empty (global scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfNotEmpty = function (field: string, errorMessage?: string) {\r\n return this.addRule(forbiddenIfNotEmptyRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field is not empty (sibling scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfNotEmptySibling = function (\r\n field: string,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfNotEmptyRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field's value is in the given array (global scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfIn = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field's value is in the given array (sibling scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfInSibling = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field's value is NOT in the given array (global scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfNotIn = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfNotInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Value is forbidden if another field's value is NOT in the given array (sibling scope)\r\n */\r\nBaseValidator.prototype.forbiddenIfNotInSibling = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(forbiddenIfNotInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"sibling\",\r\n });\r\n};\r\n"],"mappings":";;;;;;;;;AAeA,MAAa,0BAA0B;;;;AA0EvC,cAAc,UAAU,YAAY,SAAU,cAAuB;CACnE,OAAO,KAAK,QAAQ,eAAe,YAAY;AACjD;;;;AAKA,cAAc,UAAU,cAAc,SAAU,OAAe,OAAY,cAAuB;CAChG,OAAO,KAAK,QAAQ,iBAAiB,cAAc;EACjD;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,qBAAqB,SAC3C,OACA,OACA,cACA;CACA,OAAO,KAAK,QAAQ,iBAAiB,cAAc;EACjD;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,iBAAiB,SACvC,OACA,OACA,cACA;CACA,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,wBAAwB,SAC9C,OACA,OACA,cACA;CACA,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,mBAAmB,SAAU,OAAe,cAAuB;CACzF,OAAO,KAAK,QAAQ,sBAAsB,cAAc;EACtD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,0BAA0B,SAAU,OAAe,cAAuB;CAChG,OAAO,KAAK,QAAQ,sBAAsB,cAAc;EACtD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,sBAAsB,SAAU,OAAe,cAAuB;CAC5F,OAAO,KAAK,QAAQ,yBAAyB,cAAc;EACzD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,6BAA6B,SACnD,OACA,cACA;CACA,OAAO,KAAK,QAAQ,yBAAyB,cAAc;EACzD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,gBAAgB,SACtC,OACA,QACA,cACA;CACA,OAAO,KAAK,QAAQ,mBAAmB,cAAc;EACnD;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,uBAAuB,SAC7C,OACA,QACA,cACA;CACA,OAAO,KAAK,QAAQ,mBAAmB,cAAc;EACnD;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,mBAAmB,SACzC,OACA,QACA,cACA;CACA,OAAO,KAAK,QAAQ,sBAAsB,cAAc;EACtD;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,0BAA0B,SAChD,OACA,QACA,cACA;CACA,OAAO,KAAK,QAAQ,sBAAsB,cAAc;EACtD;EACA;EACA,OAAO;CACT,CAAC;AACH"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
//#region ../@warlock.js/seal/src/validators/methods/present-methods.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Marker re-exported by the validators barrel so the dts bundler keeps this
|
|
4
|
+
* module (and its `declare module` augmentation) in the bundled `.d.ts`.
|
|
5
|
+
*/
|
|
6
|
+
declare const presentMethodsApplied = true;
|
|
2
7
|
declare module "../base-validator.mjs" {
|
|
3
8
|
interface BaseValidator {
|
|
4
9
|
/**
|
|
@@ -98,5 +103,7 @@ declare module "../base-validator.mjs" {
|
|
|
98
103
|
*/
|
|
99
104
|
presentWithoutAnySiblings(fields: string[], errorMessage?: string): this;
|
|
100
105
|
}
|
|
101
|
-
}
|
|
106
|
+
} //# sourceMappingURL=present-methods.d.ts.map
|
|
107
|
+
//#endregion
|
|
108
|
+
export { presentMethodsApplied };
|
|
102
109
|
//# sourceMappingURL=present-methods.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"present-methods.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/present-methods.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"present-methods.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/present-methods.ts"],"mappings":";;AAwBA;;;cAAa,qBAAA;AAAA;EAAA,UAGD,aAAA;IAH8B;;;IAOtC,WAAA,CAAY,KAAA,UAAe,YAAA;IAA3B;;;IAKA,kBAAA,CAAmB,KAAA,UAAe,YAAA;IAAf;;;IAKnB,cAAA,CAAe,KAAA,UAAe,YAAA;IAAA;;;IAK9B,qBAAA,CAAsB,KAAA,UAAe,YAAA;IAKrC;;;IAAA,SAAA,CAAU,KAAA,UAAe,KAAA,OAAY,YAAA;IAKrC;;;IAAA,gBAAA,CAAiB,KAAA,UAAe,KAAA,OAAY,YAAA;IAK5C;;;IAAA,aAAA,CAAc,KAAA,UAAe,KAAA,OAAY,YAAA;IAKzC;;;IAAA,oBAAA,CAAqB,KAAA,UAAe,KAAA,OAAY,YAAA;IAKhD;;;IAAA,cAAA,CAAe,KAAA,UAAe,YAAA;IAKR;;;IAAtB,qBAAA,CAAsB,KAAA,UAAe,YAAA;IAKJ;;;IAAjC,iBAAA,CAAkB,KAAA,UAAe,YAAA;IAUjC;;;IALA,wBAAA,CAAyB,KAAA,UAAe,YAAA;IAUxC;;;IALA,WAAA,CAAY,KAAA,UAAe,MAAA,SAAe,YAAA;IAU1C;;;IALA,kBAAA,CAAmB,KAAA,UAAe,MAAA,SAAe,YAAA;IAUjD;;;IALA,cAAA,CAAe,KAAA,UAAe,MAAA,SAAe,YAAA;IAU7C;;;IALA,qBAAA,CAAsB,KAAA,UAAe,MAAA,SAAe,YAAA;IAU7B;;;IALvB,cAAA,CAAe,MAAA,YAAkB,YAAA;IAUG;;;IALpC,sBAAA,CAAuB,MAAA,YAAkB,YAAA;IAezC;;;IAVA,iBAAA,CAAkB,MAAA,YAAkB,YAAA;IAeb;;;IAVvB,yBAAA,CAA0B,MAAA,YAAkB,YAAA;IAeR;;;IAVpC,cAAA,CAAe,MAAA,YAAkB,YAAA;IAegC;;AAAA;IAVjE,sBAAA,CAAuB,MAAA,YAAkB,YAAA;;;;IAKzC,iBAAA,CAAkB,MAAA,YAAkB,YAAA;;;;IAKpC,yBAAA,CAA0B,MAAA,YAAkB,YAAA;EAAA;AAAA"}
|
|
@@ -6,6 +6,11 @@ import { presentWithoutAllRule, presentWithoutAnyRule, presentWithoutRule } from
|
|
|
6
6
|
|
|
7
7
|
//#region ../@warlock.js/seal/src/validators/methods/present-methods.ts
|
|
8
8
|
/**
|
|
9
|
+
* Marker re-exported by the validators barrel so the dts bundler keeps this
|
|
10
|
+
* module (and its `declare module` augmentation) in the bundled `.d.ts`.
|
|
11
|
+
*/
|
|
12
|
+
const presentMethodsApplied = true;
|
|
13
|
+
/**
|
|
9
14
|
* Field must be present if another field exists
|
|
10
15
|
*/
|
|
11
16
|
BaseValidator.prototype.presentWith = function(field, errorMessage) {
|
|
@@ -231,5 +236,5 @@ BaseValidator.prototype.presentWithoutAnySiblings = function(fields, errorMessag
|
|
|
231
236
|
};
|
|
232
237
|
|
|
233
238
|
//#endregion
|
|
234
|
-
export {
|
|
239
|
+
export { presentMethodsApplied };
|
|
235
240
|
//# sourceMappingURL=present-methods.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"present-methods.mjs","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/present-methods.ts"],"sourcesContent":["import {\r\n presentIfEmptyRule,\r\n presentIfInRule,\r\n presentIfNotEmptyRule,\r\n presentIfNotInRule,\r\n presentIfRule,\r\n} from \"../../rules/conditional/present-if-rules\";\r\nimport { presentUnlessRule } from \"../../rules/conditional/present-unless-rules\";\r\nimport {\r\n presentWithAllRule,\r\n presentWithAnyRule,\r\n presentWithRule,\r\n} from \"../../rules/conditional/present-with-rules\";\r\nimport {\r\n presentWithoutAllRule,\r\n presentWithoutAnyRule,\r\n presentWithoutRule,\r\n} from \"../../rules/conditional/present-without-rules\";\r\nimport { BaseValidator } from \"../base-validator\";\r\n\r\ndeclare module \"../base-validator\" {\r\n interface BaseValidator {\r\n /**\r\n * Field must be present if another field exists\r\n */\r\n presentWith(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field exists\r\n */\r\n presentWithSibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another field is missing\r\n */\r\n presentWithout(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field is missing\r\n */\r\n presentWithoutSibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another field equals a specific value\r\n */\r\n presentIf(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field equals a specific value\r\n */\r\n presentIfSibling(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present unless another field equals a specific value\r\n */\r\n presentUnless(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present unless another sibling field equals a specific value\r\n */\r\n presentUnlessSibling(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another field is empty\r\n */\r\n presentIfEmpty(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field is empty\r\n */\r\n presentIfEmptySibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another field is not empty\r\n */\r\n presentIfNotEmpty(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field is not empty\r\n */\r\n presentIfNotEmptySibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another field's value is in the given array\r\n */\r\n presentIfIn(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field's value is in the given array\r\n */\r\n presentIfInSibling(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another field's value is NOT in the given array\r\n */\r\n presentIfNotIn(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field's value is NOT in the given array\r\n */\r\n presentIfNotInSibling(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if all specified fields exist\r\n */\r\n presentWithAll(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if all specified sibling fields exist\r\n */\r\n presentWithAllSiblings(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if all specified fields are missing\r\n */\r\n presentWithoutAll(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if all specified sibling fields are missing\r\n */\r\n presentWithoutAllSiblings(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if any of the specified fields exists\r\n */\r\n presentWithAny(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if any of the specified sibling fields exists\r\n */\r\n presentWithAnySiblings(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if any of the specified fields is missing\r\n */\r\n presentWithoutAny(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if any of the specified sibling fields is missing\r\n */\r\n presentWithoutAnySiblings(fields: string[], errorMessage?: string): this;\r\n }\r\n}\r\n\r\n// ==================== PRESENT: BASED ON FIELD PRESENCE ====================\r\n\r\n/**\r\n * Field must be present if another field exists\r\n */\r\nBaseValidator.prototype.presentWith = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentWithRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field exists\r\n */\r\nBaseValidator.prototype.presentWithSibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentWithRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another field is missing\r\n */\r\nBaseValidator.prototype.presentWithout = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentWithoutRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field is missing\r\n */\r\nBaseValidator.prototype.presentWithoutSibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentWithoutRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n// ==================== PRESENT: BASED ON FIELD VALUE ====================\r\n\r\n/**\r\n * Field must be present if another field equals a specific value\r\n */\r\nBaseValidator.prototype.presentIf = function (field: string, value: any, errorMessage?: string) {\r\n return this.addRule(presentIfRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field equals a specific value\r\n */\r\nBaseValidator.prototype.presentIfSibling = function (\r\n field: string,\r\n value: any,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentIfRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present unless another field equals a specific value\r\n */\r\nBaseValidator.prototype.presentUnless = function (\r\n field: string,\r\n value: any,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentUnlessRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present unless another sibling field equals a specific value\r\n */\r\nBaseValidator.prototype.presentUnlessSibling = function (\r\n field: string,\r\n value: any,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentUnlessRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n// ==================== PRESENT: BASED ON FIELD EMPTY STATE ====================\r\n\r\n/**\r\n * Field must be present if another field is empty\r\n */\r\nBaseValidator.prototype.presentIfEmpty = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentIfEmptyRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field is empty\r\n */\r\nBaseValidator.prototype.presentIfEmptySibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentIfEmptyRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another field is not empty\r\n */\r\nBaseValidator.prototype.presentIfNotEmpty = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentIfNotEmptyRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field is not empty\r\n */\r\nBaseValidator.prototype.presentIfNotEmptySibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentIfNotEmptyRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another field's value is in the given array\r\n */\r\nBaseValidator.prototype.presentIfIn = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentIfInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field's value is in the given array\r\n */\r\nBaseValidator.prototype.presentIfInSibling = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentIfInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another field's value is NOT in the given array\r\n */\r\nBaseValidator.prototype.presentIfNotIn = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentIfNotInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field's value is NOT in the given array\r\n */\r\nBaseValidator.prototype.presentIfNotInSibling = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentIfNotInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n// ==================== PRESENT: BASED ON MULTIPLE FIELDS (ALL) ====================\r\n\r\n/**\r\n * Field must be present if all specified fields exist\r\n */\r\nBaseValidator.prototype.presentWithAll = function (fields: string[], errorMessage?: string) {\r\n return this.addRule(presentWithAllRule, errorMessage, {\r\n fields,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if all specified sibling fields exist\r\n */\r\nBaseValidator.prototype.presentWithAllSiblings = function (\r\n fields: string[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentWithAllRule, errorMessage, {\r\n fields,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if all specified fields are missing\r\n */\r\nBaseValidator.prototype.presentWithoutAll = function (fields: string[], errorMessage?: string) {\r\n return this.addRule(presentWithoutAllRule, errorMessage, {\r\n fields,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if all specified sibling fields are missing\r\n */\r\nBaseValidator.prototype.presentWithoutAllSiblings = function (\r\n fields: string[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentWithoutAllRule, errorMessage, {\r\n fields,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n// ==================== PRESENT: BASED ON MULTIPLE FIELDS (ANY) ====================\r\n\r\n/**\r\n * Field must be present if any of the specified fields exists\r\n */\r\nBaseValidator.prototype.presentWithAny = function (fields: string[], errorMessage?: string) {\r\n return this.addRule(presentWithAnyRule, errorMessage, {\r\n fields,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if any of the specified sibling fields exists\r\n */\r\nBaseValidator.prototype.presentWithAnySiblings = function (\r\n fields: string[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentWithAnyRule, errorMessage, {\r\n fields,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if any of the specified fields is missing\r\n */\r\nBaseValidator.prototype.presentWithoutAny = function (fields: string[], errorMessage?: string) {\r\n return this.addRule(presentWithoutAnyRule, errorMessage, {\r\n fields,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if any of the specified sibling fields is missing\r\n */\r\nBaseValidator.prototype.presentWithoutAnySiblings = function (\r\n fields: string[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentWithoutAnyRule, errorMessage, {\r\n fields,\r\n scope: \"sibling\",\r\n });\r\n};\r\n"],"mappings":";;;;;;;;;;AAqJA,cAAc,UAAU,cAAc,SAAU,OAAe,cAAuB;CACpF,OAAO,KAAK,QAAQ,iBAAiB,cAAc;EACjD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,qBAAqB,SAAU,OAAe,cAAuB;CAC3F,OAAO,KAAK,QAAQ,iBAAiB,cAAc;EACjD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,iBAAiB,SAAU,OAAe,cAAuB;CACvF,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,wBAAwB,SAAU,OAAe,cAAuB;CAC9F,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA,OAAO;CACT,CAAC;AACH;;;;AAOA,cAAc,UAAU,YAAY,SAAU,OAAe,OAAY,cAAuB;CAC9F,OAAO,KAAK,QAAQ,eAAe,cAAc;EAC/C;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,mBAAmB,SACzC,OACA,OACA,cACA;CACA,OAAO,KAAK,QAAQ,eAAe,cAAc;EAC/C;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,gBAAgB,SACtC,OACA,OACA,cACA;CACA,OAAO,KAAK,QAAQ,mBAAmB,cAAc;EACnD;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,uBAAuB,SAC7C,OACA,OACA,cACA;CACA,OAAO,KAAK,QAAQ,mBAAmB,cAAc;EACnD;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAOA,cAAc,UAAU,iBAAiB,SAAU,OAAe,cAAuB;CACvF,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,wBAAwB,SAAU,OAAe,cAAuB;CAC9F,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,oBAAoB,SAAU,OAAe,cAAuB;CAC1F,OAAO,KAAK,QAAQ,uBAAuB,cAAc;EACvD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,2BAA2B,SAAU,OAAe,cAAuB;CACjG,OAAO,KAAK,QAAQ,uBAAuB,cAAc;EACvD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,cAAc,SACpC,OACA,QACA,cACA;CACA,OAAO,KAAK,QAAQ,iBAAiB,cAAc;EACjD;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,qBAAqB,SAC3C,OACA,QACA,cACA;CACA,OAAO,KAAK,QAAQ,iBAAiB,cAAc;EACjD;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,iBAAiB,SACvC,OACA,QACA,cACA;CACA,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,wBAAwB,SAC9C,OACA,QACA,cACA;CACA,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA;EACA,OAAO;CACT,CAAC;AACH;;;;AAOA,cAAc,UAAU,iBAAiB,SAAU,QAAkB,cAAuB;CAC1F,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,yBAAyB,SAC/C,QACA,cACA;CACA,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,oBAAoB,SAAU,QAAkB,cAAuB;CAC7F,OAAO,KAAK,QAAQ,uBAAuB,cAAc;EACvD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,4BAA4B,SAClD,QACA,cACA;CACA,OAAO,KAAK,QAAQ,uBAAuB,cAAc;EACvD;EACA,OAAO;CACT,CAAC;AACH;;;;AAOA,cAAc,UAAU,iBAAiB,SAAU,QAAkB,cAAuB;CAC1F,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,yBAAyB,SAC/C,QACA,cACA;CACA,OAAO,KAAK,QAAQ,oBAAoB,cAAc;EACpD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,oBAAoB,SAAU,QAAkB,cAAuB;CAC7F,OAAO,KAAK,QAAQ,uBAAuB,cAAc;EACvD;EACA,OAAO;CACT,CAAC;AACH;;;;AAKA,cAAc,UAAU,4BAA4B,SAClD,QACA,cACA;CACA,OAAO,KAAK,QAAQ,uBAAuB,cAAc;EACvD;EACA,OAAO;CACT,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"present-methods.mjs","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/present-methods.ts"],"sourcesContent":["import {\r\n presentIfEmptyRule,\r\n presentIfInRule,\r\n presentIfNotEmptyRule,\r\n presentIfNotInRule,\r\n presentIfRule,\r\n} from \"../../rules/conditional/present-if-rules\";\r\nimport { presentUnlessRule } from \"../../rules/conditional/present-unless-rules\";\r\nimport {\r\n presentWithAllRule,\r\n presentWithAnyRule,\r\n presentWithRule,\r\n} from \"../../rules/conditional/present-with-rules\";\r\nimport {\r\n presentWithoutAllRule,\r\n presentWithoutAnyRule,\r\n presentWithoutRule,\r\n} from \"../../rules/conditional/present-without-rules\";\r\nimport { BaseValidator } from \"../base-validator\";\r\n\r\n/**\r\n * Marker re-exported by the validators barrel so the dts bundler keeps this\r\n * module (and its `declare module` augmentation) in the bundled `.d.ts`.\r\n */\r\nexport const presentMethodsApplied = true;\r\n\r\ndeclare module \"../base-validator\" {\r\n interface BaseValidator {\r\n /**\r\n * Field must be present if another field exists\r\n */\r\n presentWith(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field exists\r\n */\r\n presentWithSibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another field is missing\r\n */\r\n presentWithout(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field is missing\r\n */\r\n presentWithoutSibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another field equals a specific value\r\n */\r\n presentIf(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field equals a specific value\r\n */\r\n presentIfSibling(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present unless another field equals a specific value\r\n */\r\n presentUnless(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present unless another sibling field equals a specific value\r\n */\r\n presentUnlessSibling(field: string, value: any, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another field is empty\r\n */\r\n presentIfEmpty(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field is empty\r\n */\r\n presentIfEmptySibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another field is not empty\r\n */\r\n presentIfNotEmpty(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field is not empty\r\n */\r\n presentIfNotEmptySibling(field: string, errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another field's value is in the given array\r\n */\r\n presentIfIn(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field's value is in the given array\r\n */\r\n presentIfInSibling(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another field's value is NOT in the given array\r\n */\r\n presentIfNotIn(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if another sibling field's value is NOT in the given array\r\n */\r\n presentIfNotInSibling(field: string, values: any[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if all specified fields exist\r\n */\r\n presentWithAll(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if all specified sibling fields exist\r\n */\r\n presentWithAllSiblings(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if all specified fields are missing\r\n */\r\n presentWithoutAll(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if all specified sibling fields are missing\r\n */\r\n presentWithoutAllSiblings(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if any of the specified fields exists\r\n */\r\n presentWithAny(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if any of the specified sibling fields exists\r\n */\r\n presentWithAnySiblings(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if any of the specified fields is missing\r\n */\r\n presentWithoutAny(fields: string[], errorMessage?: string): this;\r\n\r\n /**\r\n * Field must be present if any of the specified sibling fields is missing\r\n */\r\n presentWithoutAnySiblings(fields: string[], errorMessage?: string): this;\r\n }\r\n}\r\n\r\n// ==================== PRESENT: BASED ON FIELD PRESENCE ====================\r\n\r\n/**\r\n * Field must be present if another field exists\r\n */\r\nBaseValidator.prototype.presentWith = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentWithRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field exists\r\n */\r\nBaseValidator.prototype.presentWithSibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentWithRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another field is missing\r\n */\r\nBaseValidator.prototype.presentWithout = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentWithoutRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field is missing\r\n */\r\nBaseValidator.prototype.presentWithoutSibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentWithoutRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n// ==================== PRESENT: BASED ON FIELD VALUE ====================\r\n\r\n/**\r\n * Field must be present if another field equals a specific value\r\n */\r\nBaseValidator.prototype.presentIf = function (field: string, value: any, errorMessage?: string) {\r\n return this.addRule(presentIfRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field equals a specific value\r\n */\r\nBaseValidator.prototype.presentIfSibling = function (\r\n field: string,\r\n value: any,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentIfRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present unless another field equals a specific value\r\n */\r\nBaseValidator.prototype.presentUnless = function (\r\n field: string,\r\n value: any,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentUnlessRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present unless another sibling field equals a specific value\r\n */\r\nBaseValidator.prototype.presentUnlessSibling = function (\r\n field: string,\r\n value: any,\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentUnlessRule, errorMessage, {\r\n field,\r\n value,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n// ==================== PRESENT: BASED ON FIELD EMPTY STATE ====================\r\n\r\n/**\r\n * Field must be present if another field is empty\r\n */\r\nBaseValidator.prototype.presentIfEmpty = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentIfEmptyRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field is empty\r\n */\r\nBaseValidator.prototype.presentIfEmptySibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentIfEmptyRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another field is not empty\r\n */\r\nBaseValidator.prototype.presentIfNotEmpty = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentIfNotEmptyRule, errorMessage, {\r\n field,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field is not empty\r\n */\r\nBaseValidator.prototype.presentIfNotEmptySibling = function (field: string, errorMessage?: string) {\r\n return this.addRule(presentIfNotEmptyRule, errorMessage, {\r\n field,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another field's value is in the given array\r\n */\r\nBaseValidator.prototype.presentIfIn = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentIfInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field's value is in the given array\r\n */\r\nBaseValidator.prototype.presentIfInSibling = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentIfInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another field's value is NOT in the given array\r\n */\r\nBaseValidator.prototype.presentIfNotIn = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentIfNotInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if another sibling field's value is NOT in the given array\r\n */\r\nBaseValidator.prototype.presentIfNotInSibling = function (\r\n field: string,\r\n values: any[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentIfNotInRule, errorMessage, {\r\n field,\r\n values,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n// ==================== PRESENT: BASED ON MULTIPLE FIELDS (ALL) ====================\r\n\r\n/**\r\n * Field must be present if all specified fields exist\r\n */\r\nBaseValidator.prototype.presentWithAll = function (fields: string[], errorMessage?: string) {\r\n return this.addRule(presentWithAllRule, errorMessage, {\r\n fields,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if all specified sibling fields exist\r\n */\r\nBaseValidator.prototype.presentWithAllSiblings = function (\r\n fields: string[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentWithAllRule, errorMessage, {\r\n fields,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if all specified fields are missing\r\n */\r\nBaseValidator.prototype.presentWithoutAll = function (fields: string[], errorMessage?: string) {\r\n return this.addRule(presentWithoutAllRule, errorMessage, {\r\n fields,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if all specified sibling fields are missing\r\n */\r\nBaseValidator.prototype.presentWithoutAllSiblings = function (\r\n fields: string[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentWithoutAllRule, errorMessage, {\r\n fields,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n// ==================== PRESENT: BASED ON MULTIPLE FIELDS (ANY) ====================\r\n\r\n/**\r\n * Field must be present if any of the specified fields exists\r\n */\r\nBaseValidator.prototype.presentWithAny = function (fields: string[], errorMessage?: string) {\r\n return this.addRule(presentWithAnyRule, errorMessage, {\r\n fields,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if any of the specified sibling fields exists\r\n */\r\nBaseValidator.prototype.presentWithAnySiblings = function (\r\n fields: string[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentWithAnyRule, errorMessage, {\r\n fields,\r\n scope: \"sibling\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if any of the specified fields is missing\r\n */\r\nBaseValidator.prototype.presentWithoutAny = function (fields: string[], errorMessage?: string) {\r\n return this.addRule(presentWithoutAnyRule, errorMessage, {\r\n fields,\r\n scope: \"global\",\r\n });\r\n};\r\n\r\n/**\r\n * Field must be present if any of the specified sibling fields is missing\r\n */\r\nBaseValidator.prototype.presentWithoutAnySiblings = function (\r\n fields: string[],\r\n errorMessage?: string,\r\n) {\r\n return this.addRule(presentWithoutAnyRule, errorMessage, {\r\n fields,\r\n scope: \"sibling\",\r\n });\r\n};\r\n"],"mappings":"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"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { SchemaContext } from "../../types/context-types.mjs";
|
|
2
2
|
|
|
3
3
|
//#region ../@warlock.js/seal/src/validators/methods/required-methods.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Marker re-exported by the validators barrel so the dts bundler keeps this
|
|
6
|
+
* module (and its `declare module` augmentation) in the bundled `.d.ts`.
|
|
7
|
+
* Without a real export, side-effect-only augmentation modules get tree-shaken
|
|
8
|
+
* out of the published types, dropping every chainable rule method.
|
|
9
|
+
*/
|
|
10
|
+
declare const requiredMethodsApplied = true;
|
|
4
11
|
declare module "../base-validator.mjs" {
|
|
5
12
|
interface BaseValidator {
|
|
6
13
|
/**
|
|
@@ -190,4 +197,6 @@ declare module "../base-validator.mjs" {
|
|
|
190
197
|
requiredWhen(callback: (context: SchemaContext) => boolean | Promise<boolean>, errorMessage?: string): this;
|
|
191
198
|
}
|
|
192
199
|
} //# sourceMappingURL=required-methods.d.ts.map
|
|
200
|
+
//#endregion
|
|
201
|
+
export { requiredMethodsApplied };
|
|
193
202
|
//# sourceMappingURL=required-methods.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"required-methods.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/required-methods.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"required-methods.d.mts","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/validators/methods/required-methods.ts"],"mappings":";;;;;AAiCA;;;;cAAa,sBAAA;AAAA;EAAA,UAGD,aAAA;IAyNc;;;IArNtB,QAAA,CAAS,YAAA;IAAA;;;IAKT,OAAA,CAAQ,YAAA;IAMa;;;;IAArB,QAAA;MAAqB,UAAA;IAAA;IAyBrB;;;;;;;;;;;;;IAVA,OAAA;MAAoB,UAAA;MAAkB,UAAA;IAAA;IAmCtC;;;IA9BA,YAAA,CAAa,KAAA,UAAe,YAAA;IAmC5B;;;IA9BA,mBAAA,CAAoB,KAAA,UAAe,YAAA;IAmCnC;;;IA9BA,eAAA,CAAgB,KAAA,UAAe,YAAA;IAmCR;;;IA9BvB,sBAAA,CAAuB,KAAA,UAAe,YAAA;IAmCJ;;;IA9BlC,UAAA,CAAW,KAAA,UAAe,KAAA,OAAY,YAAA;IAwCtC;;;IAnCA,iBAAA,CAAkB,KAAA,UAAe,KAAA,OAAY,YAAA;IAwClB;;;IAnC3B,cAAA,CAAe,KAAA,UAAe,KAAA,OAAY,YAAA;IAwCL;;;IAnCrC,qBAAA,CAAsB,KAAA,UAAe,KAAA,OAAY,YAAA;IA6CjD;;;IAxCA,eAAA,CAAgB,KAAA,UAAe,YAAA;IA6CD;;;IAxC9B,sBAAA,CAAuB,KAAA,UAAe,YAAA;IA6CE;;;IAxCxC,kBAAA,CAAmB,KAAA,UAAe,YAAA;IAkDlC;;;IA7CA,yBAAA,CAA0B,KAAA,UAAe,YAAA;IAkDzC;;;IA7CA,kBAAA,CAAmB,MAAA,YAAkB,YAAA;IAkDrC;;;IA7CA,0BAAA,CAA2B,MAAA,YAAkB,YAAA;IAkD7C;;;IA7CA,kBAAA,CAAmB,MAAA,YAAkB,YAAA;IAkDrC;;;IA7CA,0BAAA,CAA2B,MAAA,YAAkB,YAAA;IAkDrB;;;IA7CxB,qBAAA,CAAsB,MAAA,YAAkB,YAAA;IAkDH;;;IA7CrC,6BAAA,CAA8B,MAAA,YAAkB,YAAA;IAuDhD;;;IAlDA,qBAAA,CAAsB,MAAA,YAAkB,YAAA;IAuDhB;;;IAlDxB,6BAAA,CAA8B,MAAA,YAAkB,YAAA;IAuDX;;;IAlDrC,YAAA,CAAa,KAAA,UAAe,MAAA,SAAe,YAAA;IAiF3C;;;IA5EA,mBAAA,CAAoB,KAAA,UAAe,MAAA,SAAe,YAAA;IA6EhD;;;IAxEF,eAAA,CAAgB,KAAA,UAAe,MAAA,SAAe,YAAA;IAyEvB;;;IApEvB,sBAAA,CAAuB,KAAA,UAAe,MAAA,SAAe,YAAA;;;;IAKrD,eAAA,CAAgB,MAAA,YAAkB,YAAA;;;;IAKlC,uBAAA,CAAwB,MAAA,YAAkB,YAAA;;;;IAK1C,kBAAA,CAAmB,MAAA,YAAkB,YAAA;;;;IAKrC,0BAAA,CAA2B,MAAA,YAAkB,YAAA;;;;IAK7C,eAAA,CAAgB,MAAA,YAAkB,YAAA;;;;IAKlC,uBAAA,CAAwB,MAAA,YAAkB,YAAA;;;;IAK1C,kBAAA,CAAmB,MAAA,YAAkB,YAAA;;;;IAKrC,0BAAA,CAA2B,MAAA,YAAkB,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;IA0B7C,YAAA,CACE,QAAA,GAAW,OAAA,EAAS,aAAA,eAA4B,OAAO,WACvD,YAAA;EAAA;AAAA"}
|
|
@@ -8,6 +8,13 @@ import { requiredWithoutAllRule, requiredWithoutAnyRule, requiredWithoutRule } f
|
|
|
8
8
|
|
|
9
9
|
//#region ../@warlock.js/seal/src/validators/methods/required-methods.ts
|
|
10
10
|
/**
|
|
11
|
+
* Marker re-exported by the validators barrel so the dts bundler keeps this
|
|
12
|
+
* module (and its `declare module` augmentation) in the bundled `.d.ts`.
|
|
13
|
+
* Without a real export, side-effect-only augmentation modules get tree-shaken
|
|
14
|
+
* out of the published types, dropping every chainable rule method.
|
|
15
|
+
*/
|
|
16
|
+
const requiredMethodsApplied = true;
|
|
17
|
+
/**
|
|
11
18
|
* This value must be present and has a value
|
|
12
19
|
*/
|
|
13
20
|
BaseValidator.prototype.required = function(errorMessage) {
|
|
@@ -343,5 +350,5 @@ BaseValidator.prototype.requiredWhen = function(callback, errorMessage) {
|
|
|
343
350
|
};
|
|
344
351
|
|
|
345
352
|
//#endregion
|
|
346
|
-
export {
|
|
353
|
+
export { requiredMethodsApplied };
|
|
347
354
|
//# sourceMappingURL=required-methods.mjs.map
|