@warlock.js/seal 4.1.7 → 4.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.cjs +92 -92
- package/cjs/index.cjs.map +1 -1
- package/esm/config.d.mts +1 -1
- package/esm/config.mjs +1 -1
- package/esm/factory/validate.d.mts +1 -1
- package/esm/factory/validate.mjs +1 -1
- package/esm/factory/validators.d.mts +1 -1
- package/esm/factory/validators.mjs +1 -1
- package/esm/helpers/date-helpers.d.mts +1 -1
- package/esm/helpers/date-helpers.mjs +1 -1
- package/esm/helpers/file.utils.d.mts +1 -1
- package/esm/helpers/file.utils.mjs +1 -1
- package/esm/helpers/get-field-value.d.mts +1 -1
- package/esm/helpers/get-field-value.mjs +1 -1
- package/esm/helpers/is-empty-value.mjs +1 -1
- package/esm/helpers/path-helpers.d.mts +1 -1
- package/esm/helpers/path-helpers.mjs +1 -1
- package/esm/helpers/validation-helpers.d.mts +1 -1
- package/esm/helpers/validation-helpers.mjs +1 -1
- package/esm/index.d.mts +5 -1
- package/esm/mutators/array-mutators.d.mts +1 -1
- package/esm/mutators/array-mutators.mjs +1 -1
- package/esm/mutators/date-mutators.d.mts +1 -1
- package/esm/mutators/date-mutators.mjs +1 -1
- package/esm/mutators/number-mutators.d.mts +1 -1
- package/esm/mutators/number-mutators.mjs +1 -1
- package/esm/mutators/object-mutators.d.mts +1 -1
- package/esm/mutators/object-mutators.mjs +1 -1
- package/esm/mutators/scalar-mutators.d.mts +1 -1
- package/esm/mutators/scalar-mutators.mjs +1 -1
- package/esm/mutators/string-mutators.d.mts +1 -1
- package/esm/mutators/string-mutators.mjs +1 -1
- package/esm/plugins/plugin-system.d.mts +1 -1
- package/esm/plugins/plugin-system.mjs +1 -1
- package/esm/rules/array/array-rules.d.mts +1 -1
- package/esm/rules/array/array-rules.mjs +1 -1
- package/esm/rules/color/color-rules.d.mts +1 -1
- package/esm/rules/color/color-rules.mjs +1 -1
- package/esm/rules/common/enum.d.mts +1 -1
- package/esm/rules/common/enum.mjs +1 -1
- package/esm/rules/common/equals-field-rules.d.mts +1 -1
- package/esm/rules/common/equals-field-rules.mjs +1 -1
- package/esm/rules/common/instanceof.d.mts +1 -1
- package/esm/rules/common/instanceof.mjs +1 -1
- package/esm/rules/common/literal.d.mts +1 -1
- package/esm/rules/common/literal.mjs +1 -1
- package/esm/rules/common/type-rules.d.mts +1 -1
- package/esm/rules/common/type-rules.mjs +1 -1
- package/esm/rules/common/unknown-key.d.mts +1 -1
- package/esm/rules/common/unknown-key.mjs +1 -1
- package/esm/rules/conditional/forbidden-if-rules.d.mts +1 -1
- package/esm/rules/conditional/forbidden-if-rules.mjs +1 -1
- package/esm/rules/conditional/present-if-rules.d.mts +1 -1
- package/esm/rules/conditional/present-if-rules.mjs +1 -1
- package/esm/rules/conditional/present-unless-rules.d.mts +1 -1
- package/esm/rules/conditional/present-unless-rules.mjs +1 -1
- package/esm/rules/conditional/present-with-rules.d.mts +1 -1
- package/esm/rules/conditional/present-with-rules.mjs +1 -1
- package/esm/rules/conditional/present-without-rules.d.mts +1 -1
- package/esm/rules/conditional/present-without-rules.mjs +1 -1
- package/esm/rules/conditional/required-if-rules.d.mts +1 -1
- package/esm/rules/conditional/required-if-rules.mjs +1 -1
- package/esm/rules/conditional/required-unless-rules.d.mts +1 -1
- package/esm/rules/conditional/required-unless-rules.mjs +1 -1
- package/esm/rules/conditional/required-when-rule.d.mts +1 -1
- package/esm/rules/conditional/required-when-rule.mjs +1 -1
- package/esm/rules/conditional/required-with-rules.d.mts +1 -1
- package/esm/rules/conditional/required-with-rules.mjs +1 -1
- package/esm/rules/conditional/required-without-rules.d.mts +1 -1
- package/esm/rules/conditional/required-without-rules.mjs +1 -1
- package/esm/rules/core/equal.d.mts +1 -1
- package/esm/rules/core/equal.mjs +1 -1
- package/esm/rules/core/forbidden.d.mts +1 -1
- package/esm/rules/core/forbidden.mjs +1 -1
- package/esm/rules/core/required.d.mts +1 -1
- package/esm/rules/core/required.mjs +1 -1
- package/esm/rules/core/union.d.mts +1 -1
- package/esm/rules/core/union.mjs +1 -1
- package/esm/rules/core/when.d.mts +1 -1
- package/esm/rules/core/when.mjs +1 -1
- package/esm/rules/date/date-comparison-rules.d.mts +1 -1
- package/esm/rules/date/date-comparison-rules.mjs +1 -1
- package/esm/rules/date/date-day-rules.d.mts +1 -1
- package/esm/rules/date/date-day-rules.mjs +1 -1
- package/esm/rules/date/date-field-comparison-rules.d.mts +1 -1
- package/esm/rules/date/date-field-comparison-rules.mjs +1 -1
- package/esm/rules/date/date-period-rules.d.mts +1 -1
- package/esm/rules/date/date-period-rules.mjs +1 -1
- package/esm/rules/date/date-relative-rules.d.mts +1 -1
- package/esm/rules/date/date-relative-rules.mjs +1 -1
- package/esm/rules/date/date-special-rules.d.mts +1 -1
- package/esm/rules/date/date-special-rules.mjs +1 -1
- package/esm/rules/date/date.d.mts +1 -1
- package/esm/rules/date/date.mjs +1 -1
- package/esm/rules/file/dimensions.d.mts +1 -1
- package/esm/rules/file/dimensions.mjs +1 -1
- package/esm/rules/file/file-size.d.mts +1 -1
- package/esm/rules/file/file-size.mjs +1 -1
- package/esm/rules/length/length-rules.d.mts +1 -1
- package/esm/rules/length/length-rules.mjs +1 -1
- package/esm/rules/number/number-rules.d.mts +1 -1
- package/esm/rules/number/number-rules.mjs +1 -1
- package/esm/rules/scalar/accepted-rule.mjs +1 -1
- package/esm/rules/scalar/declined-rule.mjs +1 -1
- package/esm/rules/string/alpha.d.mts +1 -1
- package/esm/rules/string/alpha.mjs +1 -1
- package/esm/rules/string/credit-card.d.mts +1 -1
- package/esm/rules/string/credit-card.mjs +1 -1
- package/esm/rules/string/email.d.mts +1 -1
- package/esm/rules/string/email.mjs +1 -1
- package/esm/rules/string/id-formats.d.mts +1 -1
- package/esm/rules/string/id-formats.mjs +1 -1
- package/esm/rules/string/ip.d.mts +1 -1
- package/esm/rules/string/ip.mjs +1 -1
- package/esm/rules/string/matches.d.mts +1 -1
- package/esm/rules/string/matches.mjs +1 -1
- package/esm/rules/string/pattern.d.mts +1 -1
- package/esm/rules/string/pattern.mjs +1 -1
- package/esm/rules/string/string-comparison.d.mts +1 -1
- package/esm/rules/string/string-comparison.mjs +1 -1
- package/esm/rules/string/strong-password-rule.d.mts +1 -1
- package/esm/rules/string/strong-password-rule.mjs +1 -1
- package/esm/rules/string/url.d.mts +1 -1
- package/esm/rules/string/url.mjs +1 -1
- package/esm/rules/string/without-whitespace.d.mts +1 -1
- package/esm/rules/string/without-whitespace.mjs +1 -1
- package/esm/standard-schema/json-schema.d.mts +1 -1
- package/esm/standard-schema/json-schema.mjs +1 -1
- package/esm/standard-schema/map-result.d.mts +1 -1
- package/esm/standard-schema/map-result.mjs +1 -1
- package/esm/standard-schema/types.d.mts +1 -1
- package/esm/types/conditional-types.d.mts +1 -1
- package/esm/types/context-types.d.mts +1 -1
- package/esm/types/data-transformer-types.d.mts +1 -1
- package/esm/types/date-types.d.mts +1 -1
- package/esm/types/date-types.mjs +1 -1
- package/esm/types/file.types.d.mts +1 -1
- package/esm/types/inference-types.d.mts +1 -1
- package/esm/types/mutator-types.d.mts +1 -1
- package/esm/types/result-types.d.mts +1 -1
- package/esm/types/rule-types.d.mts +1 -1
- package/esm/types/schema-types.d.mts +1 -1
- package/esm/validators/any-validator.d.mts +1 -1
- package/esm/validators/any-validator.mjs +1 -1
- package/esm/validators/array-validator.d.mts +1 -1
- package/esm/validators/array-validator.mjs +1 -1
- package/esm/validators/base-validator.d.mts +1 -1
- package/esm/validators/base-validator.mjs +1 -1
- package/esm/validators/boolean-validator.d.mts +1 -1
- package/esm/validators/boolean-validator.mjs +1 -1
- package/esm/validators/computed-validator.d.mts +1 -1
- package/esm/validators/computed-validator.mjs +1 -1
- package/esm/validators/date-validator.d.mts +1 -1
- package/esm/validators/date-validator.mjs +1 -1
- package/esm/validators/discriminated-union-validator.d.mts +1 -1
- package/esm/validators/discriminated-union-validator.mjs +1 -1
- package/esm/validators/float-validator.d.mts +1 -1
- package/esm/validators/float-validator.mjs +1 -1
- package/esm/validators/instanceof-validator.d.mts +1 -1
- package/esm/validators/instanceof-validator.mjs +1 -1
- package/esm/validators/int-validator.d.mts +1 -1
- package/esm/validators/int-validator.mjs +1 -1
- package/esm/validators/lazy-validator.d.mts +1 -1
- package/esm/validators/lazy-validator.mjs +1 -1
- package/esm/validators/literal-validator.d.mts +1 -1
- package/esm/validators/literal-validator.mjs +1 -1
- package/esm/validators/managed-validator.d.mts +1 -1
- package/esm/validators/managed-validator.mjs +1 -1
- package/esm/validators/methods/equality-conditional-methods.d.mts +2 -2
- package/esm/validators/methods/equality-conditional-methods.mjs +1 -1
- package/esm/validators/methods/equality-conditional-methods.mjs.map +1 -1
- package/esm/validators/methods/forbidden-methods.d.mts +2 -2
- package/esm/validators/methods/forbidden-methods.mjs +1 -1
- package/esm/validators/methods/forbidden-methods.mjs.map +1 -1
- package/esm/validators/methods/present-methods.d.mts +2 -2
- package/esm/validators/methods/present-methods.mjs +1 -1
- package/esm/validators/methods/present-methods.mjs.map +1 -1
- package/esm/validators/methods/required-methods.d.mts +2 -2
- package/esm/validators/methods/required-methods.mjs +1 -1
- package/esm/validators/methods/required-methods.mjs.map +1 -1
- package/esm/validators/number-validator.d.mts +1 -1
- package/esm/validators/number-validator.mjs +1 -1
- package/esm/validators/numeric-validator.d.mts +1 -1
- package/esm/validators/numeric-validator.mjs +1 -1
- package/esm/validators/object-validator.d.mts +1 -1
- package/esm/validators/object-validator.mjs +1 -1
- package/esm/validators/primitive-validator.d.mts +1 -1
- package/esm/validators/primitive-validator.mjs +1 -1
- package/esm/validators/record-validator.d.mts +1 -1
- package/esm/validators/record-validator.mjs +1 -1
- package/esm/validators/scalar-validator.d.mts +1 -1
- package/esm/validators/scalar-validator.mjs +1 -1
- package/esm/validators/string-validator.d.mts +1 -1
- package/esm/validators/string-validator.mjs +1 -1
- package/esm/validators/tuple-validator.d.mts +1 -1
- package/esm/validators/tuple-validator.mjs +1 -1
- package/esm/validators/union-validator.d.mts +1 -1
- package/esm/validators/union-validator.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
import { SchemaContext } from "../../types/context-types.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/conditional/required-when-rule.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Required when callback returns true.
|
|
7
7
|
*
|
|
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/seal/src/rules/conditional/required-when-rule.ts
|
|
6
6
|
/**
|
|
7
7
|
* Required when callback returns true.
|
|
8
8
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/seal/src/rules/conditional/required-with-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Required with rule - field is required if another field is present
|
|
6
6
|
* Supports both global and sibling scope
|
|
@@ -4,7 +4,7 @@ import "../../helpers/index.mjs";
|
|
|
4
4
|
import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
|
|
5
5
|
import { get } from "@mongez/reinforcements";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../@warlock.js/seal/src/rules/conditional/required-with-rules.ts
|
|
8
8
|
/**
|
|
9
9
|
* Required with rule - field is required if another field is present
|
|
10
10
|
* Supports both global and sibling scope
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/seal/src/rules/conditional/required-without-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Required without rule - field is required if another field is missing
|
|
6
6
|
* Supports both global and sibling scope
|
|
@@ -4,7 +4,7 @@ import "../../helpers/index.mjs";
|
|
|
4
4
|
import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
|
|
5
5
|
import { get } from "@mongez/reinforcements";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../@warlock.js/seal/src/rules/conditional/required-without-rules.ts
|
|
8
8
|
/**
|
|
9
9
|
* Required without rule - field is required if another field is missing
|
|
10
10
|
* Supports both global and sibling scope
|
package/esm/rules/core/equal.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/core/equal.ts
|
|
5
5
|
/**
|
|
6
6
|
* Equal rule - value must be equal to a specific value
|
|
7
7
|
*/
|
|
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/seal/src/rules/core/forbidden.ts
|
|
6
6
|
/**
|
|
7
7
|
* Forbidden rule - value must not be present
|
|
8
8
|
*/
|
|
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/seal/src/rules/core/required.ts
|
|
6
6
|
/**
|
|
7
7
|
* Required rule - value must be present and not empty
|
|
8
8
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
import { BaseValidator } from "../../validators/base-validator.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/core/union.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Union rule - value must match at least one of the provided validators
|
|
7
7
|
*/
|
package/esm/rules/core/union.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/core/union.ts
|
|
5
5
|
/**
|
|
6
6
|
* Union rule - value must match at least one of the provided validators
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
import { WhenRuleOptions } from "../../types/conditional-types.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/core/when.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* When rule - conditional validation based on another field value
|
|
7
7
|
*/
|
package/esm/rules/core/when.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
import { get } from "@mongez/reinforcements";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/seal/src/rules/core/when.ts
|
|
6
6
|
/**
|
|
7
7
|
* When rule - conditional validation based on another field value
|
|
8
8
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/seal/src/rules/date/date-comparison-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Between dates rule - date must be between start and end dates
|
|
6
6
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/date/date-comparison-rules.ts
|
|
5
5
|
/**
|
|
6
6
|
* Between dates rule - date must be between start and end dates
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
import { WeekDay } from "../../types/date-types.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/date/date-day-rules.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Weekend rule - date must be Saturday or Sunday
|
|
7
7
|
*/
|
|
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
import { WEEK_DAYS } from "../../types/date-types.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/seal/src/rules/date/date-day-rules.ts
|
|
6
6
|
/**
|
|
7
7
|
* Weekend rule - date must be Saturday or Sunday
|
|
8
8
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/seal/src/rules/date/date-field-comparison-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Before field rule - date must be < given date or field
|
|
6
6
|
* Smart detection: date value or field name
|
|
@@ -3,7 +3,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
|
3
3
|
import "../../helpers/index.mjs";
|
|
4
4
|
import { get } from "@mongez/reinforcements";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../@warlock.js/seal/src/rules/date/date-field-comparison-rules.ts
|
|
7
7
|
/**
|
|
8
8
|
* Before field rule - date must be < given date or field
|
|
9
9
|
* Smart detection: date value or field name
|
|
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
import { get } from "@mongez/reinforcements";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/seal/src/rules/date/date-period-rules.ts
|
|
6
6
|
const MONTHS = {
|
|
7
7
|
1: "january",
|
|
8
8
|
2: "february",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/seal/src/rules/date/date-relative-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Within days rule - date must be within X days from now (past or future)
|
|
6
6
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/date/date-relative-rules.ts
|
|
5
5
|
/**
|
|
6
6
|
* Within days rule - date must be within X days from now (past or future)
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/seal/src/rules/date/date-special-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Birthday rule - valid birthday (not in future, reasonable age)
|
|
6
6
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/date/date-special-rules.ts
|
|
5
5
|
/**
|
|
6
6
|
* Birthday rule - valid birthday (not in future, reasonable age)
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
import { WeekDay } from "../../types/date-types.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/date/date.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Date rule - validates date format
|
|
7
7
|
*/
|
package/esm/rules/date/date.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import "../../helpers/index.mjs";
|
|
|
4
4
|
import { WEEK_DAYS } from "../../types/date-types.mjs";
|
|
5
5
|
import { get } from "@mongez/reinforcements";
|
|
6
6
|
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../@warlock.js/seal/src/rules/date/date.ts
|
|
8
8
|
/**
|
|
9
9
|
* Date rule - validates date format
|
|
10
10
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/file/dimensions.ts
|
|
5
5
|
/**
|
|
6
6
|
* Min width rule - image width validation
|
|
7
7
|
*/
|
|
@@ -2,7 +2,7 @@ import { humanizeSize } from "../../helpers/file.utils.mjs";
|
|
|
2
2
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
3
3
|
import "../../helpers/index.mjs";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/seal/src/rules/file/file-size.ts
|
|
6
6
|
/**
|
|
7
7
|
* Max file size rule
|
|
8
8
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/seal/src/rules/length/length-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Min length rule - validates minimum length
|
|
6
6
|
* Works for any value with a length property (strings, arrays, etc.)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/length/length-rules.ts
|
|
5
5
|
/**
|
|
6
6
|
* Min length rule - validates minimum length
|
|
7
7
|
* Works for any value with a length property (strings, arrays, etc.)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/seal/src/rules/number/number-rules.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Min rule - value must be equal or greater than minimum
|
|
6
6
|
* Supports field names with sibling scope
|
|
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
import { get } from "@mongez/reinforcements";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/seal/src/rules/number/number-rules.ts
|
|
6
6
|
/**
|
|
7
7
|
* Min rule - value must be equal or greater than minimum
|
|
8
8
|
* Supports field names with sibling scope
|
|
@@ -3,7 +3,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
|
3
3
|
import "../../helpers/index.mjs";
|
|
4
4
|
import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../@warlock.js/seal/src/rules/scalar/accepted-rule.ts
|
|
7
7
|
const isAcceptedValue = (value) => {
|
|
8
8
|
return [
|
|
9
9
|
"1",
|
|
@@ -3,7 +3,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
|
3
3
|
import "../../helpers/index.mjs";
|
|
4
4
|
import { isEmptyValue } from "../../helpers/is-empty-value.mjs";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../@warlock.js/seal/src/rules/scalar/declined-rule.ts
|
|
7
7
|
const isDeclinedValue = (value) => {
|
|
8
8
|
return [
|
|
9
9
|
"0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/string/alpha.ts
|
|
5
5
|
/**
|
|
6
6
|
* Alpha rule - allows only alphabetic characters
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/string/credit-card.ts
|
|
5
5
|
/**
|
|
6
6
|
* Credit card rule - validates credit card number
|
|
7
7
|
*/
|
|
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
import { isEmail } from "@mongez/supportive-is";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/seal/src/rules/string/email.ts
|
|
6
6
|
/**
|
|
7
7
|
* Email rule - validates email format
|
|
8
8
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/seal/src/rules/string/id-formats.d.ts
|
|
4
4
|
type UUIDVersion = 1 | 3 | 4 | 5 | 6 | 7;
|
|
5
5
|
/**
|
|
6
6
|
* UUID rule — value must be a valid UUID. Optionally restrict to a specific version.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/string/id-formats.ts
|
|
5
5
|
/**
|
|
6
6
|
* Modern ID format validators — UUID, CUID, ULID, nanoid.
|
|
7
7
|
*
|
package/esm/rules/string/ip.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
import { isIP } from "net";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/seal/src/rules/string/ip.ts
|
|
6
6
|
/**
|
|
7
7
|
* IP rule - validates IP address (v4 or v6)
|
|
8
8
|
*/
|
|
@@ -2,7 +2,7 @@ import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
import { get } from "@mongez/reinforcements";
|
|
4
4
|
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../@warlock.js/seal/src/rules/string/matches.ts
|
|
6
6
|
/**
|
|
7
7
|
* Matches rule - value must match another field value
|
|
8
8
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/string/pattern.ts
|
|
5
5
|
/**
|
|
6
6
|
* Pattern rule - validates against regex pattern
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/string/string-comparison.ts
|
|
5
5
|
/**
|
|
6
6
|
* Starts with rule
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/seal/src/rules/string/strong-password-rule.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Strong Password rule - validates password strength
|
|
6
6
|
* Requirements:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/string/strong-password-rule.ts
|
|
5
5
|
/**
|
|
6
6
|
* Strong Password rule - validates password strength
|
|
7
7
|
* Requirements:
|
package/esm/rules/string/url.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/string/url.ts
|
|
5
5
|
/**
|
|
6
6
|
* URL rule - validates URL format
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SchemaRule } from "../../types/rule-types.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../@warlock.js/seal/src/rules/string/without-whitespace.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Without whitespace rule - value must not contain whitespace
|
|
6
6
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VALID_RULE, invalidRule } from "../../helpers/validation-helpers.mjs";
|
|
2
2
|
import "../../helpers/index.mjs";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../@warlock.js/seal/src/rules/string/without-whitespace.ts
|
|
5
5
|
/**
|
|
6
6
|
* Without whitespace rule - value must not contain whitespace
|
|
7
7
|
*/
|