valgen 5.9.0 → 5.12.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 +22 -0
- package/README.md +3 -3
- package/cjs/core/utilities.js +4 -4
- package/cjs/rules/format-rules/is-alpha.js +3 -3
- package/cjs/rules/format-rules/is-ascii.js +2 -2
- package/cjs/rules/format-rules/is-base64.js +2 -2
- package/cjs/rules/format-rules/is-btc-address.js +2 -2
- package/cjs/rules/format-rules/is-credit-card.js +2 -2
- package/cjs/rules/format-rules/is-decimal.js +2 -2
- package/cjs/rules/format-rules/is-ean.js +2 -2
- package/cjs/rules/format-rules/is-email.js +7 -7
- package/cjs/rules/format-rules/is-eth-address.js +2 -2
- package/cjs/rules/format-rules/is-fqdn.js +2 -2
- package/cjs/rules/format-rules/is-hash.js +2 -2
- package/cjs/rules/format-rules/is-hex-color.js +2 -2
- package/cjs/rules/format-rules/is-hex.js +2 -2
- package/cjs/rules/format-rules/is-iban.js +3 -3
- package/cjs/rules/format-rules/is-ip.js +3 -3
- package/cjs/rules/format-rules/is-issn.js +2 -2
- package/cjs/rules/format-rules/is-jwt.js +2 -2
- package/cjs/rules/format-rules/is-lowercase.js +3 -3
- package/cjs/rules/format-rules/is-mac-address.js +2 -2
- package/cjs/rules/format-rules/is-mobile-phone.js +2 -2
- package/cjs/rules/format-rules/is-object-id.js +1 -1
- package/cjs/rules/format-rules/is-passport-number.js +2 -2
- package/cjs/rules/format-rules/is-port.js +5 -3
- package/cjs/rules/format-rules/is-url.js +2 -2
- package/cjs/rules/format-rules/is-uuid.js +2 -2
- package/cjs/rules/format-rules/is-vat-number.js +2 -2
- package/cjs/tsconfig-build-cjs.tsbuildinfo +1 -0
- package/esm/core/utilities.js +1 -1
- package/esm/rules/format-rules/is-alpha.js +2 -2
- package/esm/rules/format-rules/is-ascii.js +2 -2
- package/esm/rules/format-rules/is-base64.js +2 -2
- package/esm/rules/format-rules/is-btc-address.js +2 -2
- package/esm/rules/format-rules/is-credit-card.js +2 -2
- package/esm/rules/format-rules/is-decimal.js +2 -2
- package/esm/rules/format-rules/is-ean.js +2 -2
- package/esm/rules/format-rules/is-email.js +2 -2
- package/esm/rules/format-rules/is-eth-address.js +2 -2
- package/esm/rules/format-rules/is-fqdn.js +2 -2
- package/esm/rules/format-rules/is-hash.js +2 -2
- package/esm/rules/format-rules/is-hex-color.js +2 -2
- package/esm/rules/format-rules/is-hex.js +2 -2
- package/esm/rules/format-rules/is-iban.js +2 -2
- package/esm/rules/format-rules/is-ip.js +2 -2
- package/esm/rules/format-rules/is-issn.js +2 -2
- package/esm/rules/format-rules/is-jwt.js +2 -2
- package/esm/rules/format-rules/is-lowercase.js +2 -2
- package/esm/rules/format-rules/is-mac-address.js +2 -2
- package/esm/rules/format-rules/is-mobile-phone.js +2 -2
- package/esm/rules/format-rules/is-object-id.js +1 -1
- package/esm/rules/format-rules/is-passport-number.js +2 -2
- package/esm/rules/format-rules/is-port.js +5 -3
- package/esm/rules/format-rules/is-url.js +2 -2
- package/esm/rules/format-rules/is-uuid.js +2 -2
- package/esm/rules/format-rules/is-vat-number.js +2 -2
- package/esm/rules/logical-rules/is-defined.js +1 -1
- package/esm/rules/logical-rules/is-empty.js +1 -1
- package/esm/rules/type-rules/is-bigint.js +1 -1
- package/esm/rules/type-rules/is-date.js +1 -1
- package/esm/rules/type-rules/is-null.js +1 -1
- package/esm/rules/type-rules/is-number.js +1 -1
- package/esm/rules/utility-rules/exists.js +1 -1
- package/esm/rules/utility-rules/union.js +1 -1
- package/esm/tsconfig-build-esm.tsbuildinfo +1 -0
- package/package.json +5 -5
- package/types/core/utilities.d.ts +2 -1
- package/types/core/validation-error.d.ts +1 -1
- package/types/core/validator.d.ts +2 -2
- package/types/index.d.cts +1 -1
- package/types/index.d.ts +1 -1
- package/types/rules/format-rules/is-alpha.d.ts +1 -1
- package/types/rules/format-rules/is-ascii.d.ts +1 -1
- package/types/rules/format-rules/is-base64.d.ts +2 -2
- package/types/rules/format-rules/is-btc-address.d.ts +1 -1
- package/types/rules/format-rules/is-credit-card.d.ts +2 -2
- package/types/rules/format-rules/is-decimal.d.ts +1 -1
- package/types/rules/format-rules/is-ean.d.ts +1 -1
- package/types/rules/format-rules/is-email.d.ts +1 -1
- package/types/rules/format-rules/is-eth-address.d.ts +1 -1
- package/types/rules/format-rules/is-fqdn.d.ts +1 -1
- package/types/rules/format-rules/is-hash.d.ts +2 -2
- package/types/rules/format-rules/is-hex-color.d.ts +1 -1
- package/types/rules/format-rules/is-hex.d.ts +1 -1
- package/types/rules/format-rules/is-iban.d.ts +1 -1
- package/types/rules/format-rules/is-ip.d.ts +1 -1
- package/types/rules/format-rules/is-issn.d.ts +1 -1
- package/types/rules/format-rules/is-jwt.d.ts +1 -1
- package/types/rules/format-rules/is-lowercase.d.ts +1 -1
- package/types/rules/format-rules/is-mac-address.d.ts +1 -1
- package/types/rules/format-rules/is-mobile-phone.d.ts +2 -2
- package/types/rules/format-rules/is-object-id.d.ts +1 -1
- package/types/rules/format-rules/is-passport-number.d.ts +1 -1
- package/types/rules/format-rules/is-port.d.ts +2 -2
- package/types/rules/format-rules/is-url.d.ts +2 -2
- package/types/rules/format-rules/is-uuid.d.ts +1 -1
- package/types/rules/format-rules/is-vat-number.d.ts +1 -1
- package/types/rules/format-rules/matches.d.ts +1 -1
- package/types/rules/logical-rules/is-defined.d.ts +1 -1
- package/types/rules/logical-rules/is-empty.d.ts +1 -1
- package/types/rules/logical-rules/range.d.ts +1 -1
- package/types/rules/type-rules/is-array.d.ts +1 -1
- package/types/rules/type-rules/is-bigint.d.ts +1 -1
- package/types/rules/type-rules/is-boolean.d.ts +1 -1
- package/types/rules/type-rules/is-date.d.ts +1 -1
- package/types/rules/type-rules/is-enum.d.ts +1 -1
- package/types/rules/type-rules/is-integer.d.ts +1 -1
- package/types/rules/type-rules/is-null.d.ts +1 -1
- package/types/rules/type-rules/is-number.d.ts +1 -1
- package/types/rules/type-rules/is-object.d.ts +1 -1
- package/types/rules/type-rules/is-record.d.ts +1 -1
- package/types/rules/type-rules/is-string.d.ts +1 -1
- package/types/rules/type-rules/is-tuple.d.ts +1 -1
- package/types/rules/type-rules/is-undefined.d.ts +1 -1
- package/types/rules/utility-rules/exists.d.ts +1 -1
- package/types/rules/utility-rules/optional.d.ts +2 -2
- package/types/rules/utility-rules/pipe.d.ts +1 -1
- package/types/rules/utility-rules/required.d.ts +2 -2
- package/types/rules/utility-rules/union.d.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidationOptions } from '../../core/index.js';
|
|
1
|
+
import { type ValidationOptions } from '../../core/index.js';
|
|
2
2
|
type IsEmptyInput = string | any[] | object | Set<any> | Map<any, any>;
|
|
3
3
|
/**
|
|
4
4
|
* Checks if value is an empty. Value should be string, array, set, map or object
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidationOptions, Validator } from '../../core/index.js';
|
|
1
|
+
import { type ValidationOptions, type Validator } from '../../core/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Validates if value is "array" and applies validation for each item.
|
|
4
4
|
* Converts input value to array if coerce option is set to 'true'.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Type, ValidationOptions, Validator as Validator_ } from '../../core/index.js';
|
|
1
|
+
import { type Type, type ValidationOptions, type Validator as Validator_ } from '../../core/index.js';
|
|
2
2
|
export declare namespace IsObject {
|
|
3
3
|
interface Validator<T extends object = object, I = object> extends Validator_<T, I> {
|
|
4
4
|
schema: Schema;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidationOptions, Validator } from '../../core/index.js';
|
|
1
|
+
import { type ValidationOptions, type Validator } from '../../core/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Validates record object according to given "key" and "value" rules
|
|
4
4
|
* Converts properties according to rules if coerce option is set to 'true'.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidationOptions, Validator } from '../../core/index.js';
|
|
1
|
+
import { type ValidationOptions, type Validator } from '../../core/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Validates if value is "tuple" and applies validation for each item.
|
|
4
4
|
* Converts input value to tuple if coerce option is set to 'true'.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Nullish } from 'ts-gems';
|
|
2
|
-
import { ValidationOptions, Validator } from '../../core/index.js';
|
|
1
|
+
import type { Nullish } from 'ts-gems';
|
|
2
|
+
import { type ValidationOptions, type Validator } from '../../core/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Makes sub-rule optional
|
|
5
5
|
* @validator optional
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Nullish } from 'ts-gems';
|
|
2
|
-
import { ValidationOptions, Validator } from '../../core/index.js';
|
|
1
|
+
import type { Nullish } from 'ts-gems';
|
|
2
|
+
import { type ValidationOptions, type Validator } from '../../core/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Makes sub-rule required
|
|
5
5
|
* @validator required
|