valgen 5.15.0 → 5.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  ## Changelog
2
2
 
3
- ### [v5.15.0](https://github.com/panates/valgen/compare/v5.14.1...v5.15.0) -
3
+ ### [v5.15.2](https://github.com/panates/valgen/compare/v5.15.1...v5.15.2) -
4
+
5
+ #### 🛠 Refactoring and Updates
6
+
7
+ - refactor: Refactored isGte, isGt, isLte, isLt typing @Eray Hanoğlu
8
+
9
+ ### [v5.15.1](https://github.com/panates/valgen/compare/v5.15.0...v5.15.1) - 27 May 2025
10
+
11
+ #### 🚀 New Features
12
+
13
+ - feat: Added isTime rule @Eray Hanoğlu
14
+
15
+ #### 🪲 Fixes
16
+
17
+ - fix: Error message fix @Eray Hanoğlu
18
+
19
+ #### 🛠 Refactoring and Updates
20
+
21
+ - refactor: Removed path filter @Eray Hanoğlu
22
+
23
+ ### [v5.15.0](https://github.com/panates/valgen/compare/v5.14.1...v5.15.0) - 24 April 2025
4
24
 
5
25
  #### 🚀 New Features
6
26
 
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isTime = isTime;
4
+ const tslib_1 = require("tslib");
5
+ const validator_1 = tslib_1.__importDefault(require("@browsery/validator"));
6
+ const index_js_1 = require("../../core/index.js");
7
+ /**
8
+ * Validates if value is a time formatted string
9
+ * @validator isTime
10
+ */
11
+ function isTime(options) {
12
+ return (0, index_js_1.validator)('isURL', (input, context, _this) => {
13
+ if (input != null &&
14
+ typeof input === 'string' &&
15
+ validator_1.default.isTime(input, options)) {
16
+ return input;
17
+ }
18
+ context.fail(_this, `Value must be a valid Time`, input);
19
+ }, options);
20
+ }
@@ -24,6 +24,7 @@ tslib_1.__exportStar(require("./format-rules/is-mobile-phone.js"), exports);
24
24
  tslib_1.__exportStar(require("./format-rules/is-object-id.js"), exports);
25
25
  tslib_1.__exportStar(require("./format-rules/is-passport-number.js"), exports);
26
26
  tslib_1.__exportStar(require("./format-rules/is-port.js"), exports);
27
+ tslib_1.__exportStar(require("./format-rules/is-time.js"), exports);
27
28
  tslib_1.__exportStar(require("./format-rules/is-url.js"), exports);
28
29
  tslib_1.__exportStar(require("./format-rules/is-uuid.js"), exports);
29
30
  tslib_1.__exportStar(require("./format-rules/is-vat-number.js"), exports);
@@ -40,6 +40,10 @@ function range(minValue, maxValue, options) {
40
40
  context.fail(_this, `Value must be between ${minValue} and ${maxValue}`, input);
41
41
  }, options);
42
42
  }
43
+ /**
44
+ * Checks if value is grater than "minValue"
45
+ * @validator iGt
46
+ */
43
47
  function isGt(minValue, options) {
44
48
  return (0, index_js_1.validator)('isGt', (input, context, _this) => {
45
49
  if ((typeof minValue === 'number' || typeof minValue === 'bigint') &&
@@ -62,6 +66,11 @@ function isGt(minValue, options) {
62
66
  context.fail(_this, `Value must be greater than ${typeof minValue === 'string' ? `"${minValue}"` : minValue}`, input);
63
67
  }, options);
64
68
  }
69
+ // *************************************************************
70
+ /**
71
+ * Checks if value is grater than or equal to minValue
72
+ * @validator isGte
73
+ */
65
74
  function isGte(minValue, options) {
66
75
  return (0, index_js_1.validator)('isGte', (input, context, _this) => {
67
76
  if ((typeof minValue === 'number' || typeof minValue === 'bigint') &&
@@ -84,6 +93,11 @@ function isGte(minValue, options) {
84
93
  context.fail(_this, `Value must be greater than or equal to ${typeof minValue === 'string' ? `"${minValue}"` : minValue}`, input);
85
94
  }, options);
86
95
  }
96
+ // *************************************************************
97
+ /**
98
+ * Checks if number value is lover than maxValue
99
+ * @validator isLt
100
+ */
87
101
  function isLt(maxValue, options) {
88
102
  return (0, index_js_1.validator)('isLt', (input, context, _this) => {
89
103
  if ((typeof maxValue === 'number' || typeof maxValue === 'bigint') &&
@@ -106,6 +120,11 @@ function isLt(maxValue, options) {
106
120
  context.fail(_this, `Value must be lover than ${typeof maxValue === 'string' ? `"${maxValue}"` : maxValue}`, input);
107
121
  }, options);
108
122
  }
123
+ // *************************************************************
124
+ /**
125
+ * Checks if value is lover than or equal to maxValue
126
+ * @validator isLte
127
+ */
109
128
  function isLte(maxValue, options) {
110
129
  return (0, index_js_1.validator)('isLte', (input, context, _this) => {
111
130
  if ((typeof maxValue === 'number' || typeof maxValue === 'bigint') &&
@@ -35,7 +35,7 @@ function isArray(itemValidator, options) {
35
35
  itemContext.index = i;
36
36
  v = itemValidator(v, {
37
37
  onFail(issue) {
38
- return `Item at index [${i}] is not a valid. ` + issue.message;
38
+ return `Item at index [${i}] is not valid. ` + issue.message;
39
39
  },
40
40
  }, itemContext);
41
41
  out.push(v);
@@ -7,8 +7,8 @@ const index_js_1 = require("../../core/index.js");
7
7
  // noinspection RegExpUnnecessaryNonCapturingGroup
8
8
  const DATE_PATTERN = /^(\d{4})(?:-(0[0-9]|1[0-2]))?(?:-([0-2][0-9]|3[0-1]))?(?:[T ](([0-1][0-9]|2[0-4]):([0-5][0-9])(?::([0-5][0-9]))?(?:\.(\d{0,3}))?)?((?:[+-](0[0-9]|1[0-2])(?::(\d{2}))?)|Z)?)?$/;
9
9
  /**
10
- * Validates if value is instance of "Date".
11
- * Converts input value to Date if coerce option is set to 'true'.
10
+ * Validates if value is an instance of "Date".
11
+ * Converts input value to Date if a coerce option is set to 'true'.
12
12
  * @validator isDate
13
13
  */
14
14
  function isDate(options) {
@@ -1 +1 @@
1
- {"root":["../../src/constants.ts","../../src/factories.ts","../../src/index.ts","../../src/core/constants.ts","../../src/core/context.ts","../../src/core/index.ts","../../src/core/types.ts","../../src/core/utilities.ts","../../src/core/validation-error.ts","../../src/core/validator.ts","../../src/helpers/object.utils.ts","../../src/helpers/omit-undefined.ts","../../src/helpers/string.utils.ts","../../src/rules/index.ts","../../src/rules/format-rules/is-alpha.ts","../../src/rules/format-rules/is-ascii.ts","../../src/rules/format-rules/is-base64.ts","../../src/rules/format-rules/is-btc-address.ts","../../src/rules/format-rules/is-credit-card.ts","../../src/rules/format-rules/is-decimal.ts","../../src/rules/format-rules/is-ean.ts","../../src/rules/format-rules/is-email.ts","../../src/rules/format-rules/is-eth-address.ts","../../src/rules/format-rules/is-fqdn.ts","../../src/rules/format-rules/is-hash.ts","../../src/rules/format-rules/is-hex-color.ts","../../src/rules/format-rules/is-hex.ts","../../src/rules/format-rules/is-iban.ts","../../src/rules/format-rules/is-ip.ts","../../src/rules/format-rules/is-issn.ts","../../src/rules/format-rules/is-jwt.ts","../../src/rules/format-rules/is-lowercase.ts","../../src/rules/format-rules/is-mac-address.ts","../../src/rules/format-rules/is-mobile-phone.ts","../../src/rules/format-rules/is-object-id.ts","../../src/rules/format-rules/is-passport-number.ts","../../src/rules/format-rules/is-port.ts","../../src/rules/format-rules/is-url.ts","../../src/rules/format-rules/is-uuid.ts","../../src/rules/format-rules/is-vat-number.ts","../../src/rules/format-rules/matches.ts","../../src/rules/logical-rules/is-defined.ts","../../src/rules/logical-rules/is-empty.ts","../../src/rules/logical-rules/is-equal.ts","../../src/rules/logical-rules/range.ts","../../src/rules/type-rules/is-any.ts","../../src/rules/type-rules/is-array.ts","../../src/rules/type-rules/is-bigint.ts","../../src/rules/type-rules/is-boolean.ts","../../src/rules/type-rules/is-date.ts","../../src/rules/type-rules/is-enum.ts","../../src/rules/type-rules/is-integer.ts","../../src/rules/type-rules/is-null.ts","../../src/rules/type-rules/is-number.ts","../../src/rules/type-rules/is-object.ts","../../src/rules/type-rules/is-record.ts","../../src/rules/type-rules/is-string.ts","../../src/rules/type-rules/is-tuple.ts","../../src/rules/type-rules/is-undefined.ts","../../src/rules/utility-rules/all-of.ts","../../src/rules/utility-rules/exists.ts","../../src/rules/utility-rules/get-length.ts","../../src/rules/utility-rules/one-of.ts","../../src/rules/utility-rules/optional.ts","../../src/rules/utility-rules/pipe.ts","../../src/rules/utility-rules/required.ts"],"version":"5.8.3"}
1
+ {"root":["../../src/constants.ts","../../src/factories.ts","../../src/index.ts","../../src/core/constants.ts","../../src/core/context.ts","../../src/core/index.ts","../../src/core/types.ts","../../src/core/utilities.ts","../../src/core/validation-error.ts","../../src/core/validator.ts","../../src/helpers/object.utils.ts","../../src/helpers/omit-undefined.ts","../../src/helpers/string.utils.ts","../../src/rules/index.ts","../../src/rules/format-rules/is-alpha.ts","../../src/rules/format-rules/is-ascii.ts","../../src/rules/format-rules/is-base64.ts","../../src/rules/format-rules/is-btc-address.ts","../../src/rules/format-rules/is-credit-card.ts","../../src/rules/format-rules/is-decimal.ts","../../src/rules/format-rules/is-ean.ts","../../src/rules/format-rules/is-email.ts","../../src/rules/format-rules/is-eth-address.ts","../../src/rules/format-rules/is-fqdn.ts","../../src/rules/format-rules/is-hash.ts","../../src/rules/format-rules/is-hex-color.ts","../../src/rules/format-rules/is-hex.ts","../../src/rules/format-rules/is-iban.ts","../../src/rules/format-rules/is-ip.ts","../../src/rules/format-rules/is-issn.ts","../../src/rules/format-rules/is-jwt.ts","../../src/rules/format-rules/is-lowercase.ts","../../src/rules/format-rules/is-mac-address.ts","../../src/rules/format-rules/is-mobile-phone.ts","../../src/rules/format-rules/is-object-id.ts","../../src/rules/format-rules/is-passport-number.ts","../../src/rules/format-rules/is-port.ts","../../src/rules/format-rules/is-time.ts","../../src/rules/format-rules/is-url.ts","../../src/rules/format-rules/is-uuid.ts","../../src/rules/format-rules/is-vat-number.ts","../../src/rules/format-rules/matches.ts","../../src/rules/logical-rules/is-defined.ts","../../src/rules/logical-rules/is-empty.ts","../../src/rules/logical-rules/is-equal.ts","../../src/rules/logical-rules/range.ts","../../src/rules/type-rules/is-any.ts","../../src/rules/type-rules/is-array.ts","../../src/rules/type-rules/is-bigint.ts","../../src/rules/type-rules/is-boolean.ts","../../src/rules/type-rules/is-date.ts","../../src/rules/type-rules/is-enum.ts","../../src/rules/type-rules/is-integer.ts","../../src/rules/type-rules/is-null.ts","../../src/rules/type-rules/is-number.ts","../../src/rules/type-rules/is-object.ts","../../src/rules/type-rules/is-record.ts","../../src/rules/type-rules/is-string.ts","../../src/rules/type-rules/is-tuple.ts","../../src/rules/type-rules/is-undefined.ts","../../src/rules/utility-rules/all-of.ts","../../src/rules/utility-rules/exists.ts","../../src/rules/utility-rules/get-length.ts","../../src/rules/utility-rules/one-of.ts","../../src/rules/utility-rules/optional.ts","../../src/rules/utility-rules/pipe.ts","../../src/rules/utility-rules/required.ts"],"version":"5.8.3"}
@@ -0,0 +1,16 @@
1
+ import validatorJS from '@browsery/validator';
2
+ import { validator, } from '../../core/index.js';
3
+ /**
4
+ * Validates if value is a time formatted string
5
+ * @validator isTime
6
+ */
7
+ export function isTime(options) {
8
+ return validator('isURL', (input, context, _this) => {
9
+ if (input != null &&
10
+ typeof input === 'string' &&
11
+ validatorJS.isTime(input, options)) {
12
+ return input;
13
+ }
14
+ context.fail(_this, `Value must be a valid Time`, input);
15
+ }, options);
16
+ }
@@ -21,6 +21,7 @@ export * from './format-rules/is-mobile-phone.js';
21
21
  export * from './format-rules/is-object-id.js';
22
22
  export * from './format-rules/is-passport-number.js';
23
23
  export * from './format-rules/is-port.js';
24
+ export * from './format-rules/is-time.js';
24
25
  export * from './format-rules/is-url.js';
25
26
  export * from './format-rules/is-uuid.js';
26
27
  export * from './format-rules/is-vat-number.js';
@@ -32,6 +32,10 @@ export function range(minValue, maxValue, options) {
32
32
  context.fail(_this, `Value must be between ${minValue} and ${maxValue}`, input);
33
33
  }, options);
34
34
  }
35
+ /**
36
+ * Checks if value is grater than "minValue"
37
+ * @validator iGt
38
+ */
35
39
  export function isGt(minValue, options) {
36
40
  return validator('isGt', (input, context, _this) => {
37
41
  if ((typeof minValue === 'number' || typeof minValue === 'bigint') &&
@@ -54,6 +58,11 @@ export function isGt(minValue, options) {
54
58
  context.fail(_this, `Value must be greater than ${typeof minValue === 'string' ? `"${minValue}"` : minValue}`, input);
55
59
  }, options);
56
60
  }
61
+ // *************************************************************
62
+ /**
63
+ * Checks if value is grater than or equal to minValue
64
+ * @validator isGte
65
+ */
57
66
  export function isGte(minValue, options) {
58
67
  return validator('isGte', (input, context, _this) => {
59
68
  if ((typeof minValue === 'number' || typeof minValue === 'bigint') &&
@@ -76,6 +85,11 @@ export function isGte(minValue, options) {
76
85
  context.fail(_this, `Value must be greater than or equal to ${typeof minValue === 'string' ? `"${minValue}"` : minValue}`, input);
77
86
  }, options);
78
87
  }
88
+ // *************************************************************
89
+ /**
90
+ * Checks if number value is lover than maxValue
91
+ * @validator isLt
92
+ */
79
93
  export function isLt(maxValue, options) {
80
94
  return validator('isLt', (input, context, _this) => {
81
95
  if ((typeof maxValue === 'number' || typeof maxValue === 'bigint') &&
@@ -98,6 +112,11 @@ export function isLt(maxValue, options) {
98
112
  context.fail(_this, `Value must be lover than ${typeof maxValue === 'string' ? `"${maxValue}"` : maxValue}`, input);
99
113
  }, options);
100
114
  }
115
+ // *************************************************************
116
+ /**
117
+ * Checks if value is lover than or equal to maxValue
118
+ * @validator isLte
119
+ */
101
120
  export function isLte(maxValue, options) {
102
121
  return validator('isLte', (input, context, _this) => {
103
122
  if ((typeof maxValue === 'number' || typeof maxValue === 'bigint') &&
@@ -32,7 +32,7 @@ export function isArray(itemValidator, options) {
32
32
  itemContext.index = i;
33
33
  v = itemValidator(v, {
34
34
  onFail(issue) {
35
- return `Item at index [${i}] is not a valid. ` + issue.message;
35
+ return `Item at index [${i}] is not valid. ` + issue.message;
36
36
  },
37
37
  }, itemContext);
38
38
  out.push(v);
@@ -3,8 +3,8 @@ import { validator, } from '../../core/index.js';
3
3
  // noinspection RegExpUnnecessaryNonCapturingGroup
4
4
  const DATE_PATTERN = /^(\d{4})(?:-(0[0-9]|1[0-2]))?(?:-([0-2][0-9]|3[0-1]))?(?:[T ](([0-1][0-9]|2[0-4]):([0-5][0-9])(?::([0-5][0-9]))?(?:\.(\d{0,3}))?)?((?:[+-](0[0-9]|1[0-2])(?::(\d{2}))?)|Z)?)?$/;
5
5
  /**
6
- * Validates if value is instance of "Date".
7
- * Converts input value to Date if coerce option is set to 'true'.
6
+ * Validates if value is an instance of "Date".
7
+ * Converts input value to Date if a coerce option is set to 'true'.
8
8
  * @validator isDate
9
9
  */
10
10
  export function isDate(options) {
@@ -1 +1 @@
1
- {"root":["../../src/constants.ts","../../src/factories.ts","../../src/index.ts","../../src/core/constants.ts","../../src/core/context.ts","../../src/core/index.ts","../../src/core/types.ts","../../src/core/utilities.ts","../../src/core/validation-error.ts","../../src/core/validator.ts","../../src/helpers/object.utils.ts","../../src/helpers/omit-undefined.ts","../../src/helpers/string.utils.ts","../../src/rules/index.ts","../../src/rules/format-rules/is-alpha.ts","../../src/rules/format-rules/is-ascii.ts","../../src/rules/format-rules/is-base64.ts","../../src/rules/format-rules/is-btc-address.ts","../../src/rules/format-rules/is-credit-card.ts","../../src/rules/format-rules/is-decimal.ts","../../src/rules/format-rules/is-ean.ts","../../src/rules/format-rules/is-email.ts","../../src/rules/format-rules/is-eth-address.ts","../../src/rules/format-rules/is-fqdn.ts","../../src/rules/format-rules/is-hash.ts","../../src/rules/format-rules/is-hex-color.ts","../../src/rules/format-rules/is-hex.ts","../../src/rules/format-rules/is-iban.ts","../../src/rules/format-rules/is-ip.ts","../../src/rules/format-rules/is-issn.ts","../../src/rules/format-rules/is-jwt.ts","../../src/rules/format-rules/is-lowercase.ts","../../src/rules/format-rules/is-mac-address.ts","../../src/rules/format-rules/is-mobile-phone.ts","../../src/rules/format-rules/is-object-id.ts","../../src/rules/format-rules/is-passport-number.ts","../../src/rules/format-rules/is-port.ts","../../src/rules/format-rules/is-url.ts","../../src/rules/format-rules/is-uuid.ts","../../src/rules/format-rules/is-vat-number.ts","../../src/rules/format-rules/matches.ts","../../src/rules/logical-rules/is-defined.ts","../../src/rules/logical-rules/is-empty.ts","../../src/rules/logical-rules/is-equal.ts","../../src/rules/logical-rules/range.ts","../../src/rules/type-rules/is-any.ts","../../src/rules/type-rules/is-array.ts","../../src/rules/type-rules/is-bigint.ts","../../src/rules/type-rules/is-boolean.ts","../../src/rules/type-rules/is-date.ts","../../src/rules/type-rules/is-enum.ts","../../src/rules/type-rules/is-integer.ts","../../src/rules/type-rules/is-null.ts","../../src/rules/type-rules/is-number.ts","../../src/rules/type-rules/is-object.ts","../../src/rules/type-rules/is-record.ts","../../src/rules/type-rules/is-string.ts","../../src/rules/type-rules/is-tuple.ts","../../src/rules/type-rules/is-undefined.ts","../../src/rules/utility-rules/all-of.ts","../../src/rules/utility-rules/exists.ts","../../src/rules/utility-rules/get-length.ts","../../src/rules/utility-rules/one-of.ts","../../src/rules/utility-rules/optional.ts","../../src/rules/utility-rules/pipe.ts","../../src/rules/utility-rules/required.ts"],"version":"5.8.3"}
1
+ {"root":["../../src/constants.ts","../../src/factories.ts","../../src/index.ts","../../src/core/constants.ts","../../src/core/context.ts","../../src/core/index.ts","../../src/core/types.ts","../../src/core/utilities.ts","../../src/core/validation-error.ts","../../src/core/validator.ts","../../src/helpers/object.utils.ts","../../src/helpers/omit-undefined.ts","../../src/helpers/string.utils.ts","../../src/rules/index.ts","../../src/rules/format-rules/is-alpha.ts","../../src/rules/format-rules/is-ascii.ts","../../src/rules/format-rules/is-base64.ts","../../src/rules/format-rules/is-btc-address.ts","../../src/rules/format-rules/is-credit-card.ts","../../src/rules/format-rules/is-decimal.ts","../../src/rules/format-rules/is-ean.ts","../../src/rules/format-rules/is-email.ts","../../src/rules/format-rules/is-eth-address.ts","../../src/rules/format-rules/is-fqdn.ts","../../src/rules/format-rules/is-hash.ts","../../src/rules/format-rules/is-hex-color.ts","../../src/rules/format-rules/is-hex.ts","../../src/rules/format-rules/is-iban.ts","../../src/rules/format-rules/is-ip.ts","../../src/rules/format-rules/is-issn.ts","../../src/rules/format-rules/is-jwt.ts","../../src/rules/format-rules/is-lowercase.ts","../../src/rules/format-rules/is-mac-address.ts","../../src/rules/format-rules/is-mobile-phone.ts","../../src/rules/format-rules/is-object-id.ts","../../src/rules/format-rules/is-passport-number.ts","../../src/rules/format-rules/is-port.ts","../../src/rules/format-rules/is-time.ts","../../src/rules/format-rules/is-url.ts","../../src/rules/format-rules/is-uuid.ts","../../src/rules/format-rules/is-vat-number.ts","../../src/rules/format-rules/matches.ts","../../src/rules/logical-rules/is-defined.ts","../../src/rules/logical-rules/is-empty.ts","../../src/rules/logical-rules/is-equal.ts","../../src/rules/logical-rules/range.ts","../../src/rules/type-rules/is-any.ts","../../src/rules/type-rules/is-array.ts","../../src/rules/type-rules/is-bigint.ts","../../src/rules/type-rules/is-boolean.ts","../../src/rules/type-rules/is-date.ts","../../src/rules/type-rules/is-enum.ts","../../src/rules/type-rules/is-integer.ts","../../src/rules/type-rules/is-null.ts","../../src/rules/type-rules/is-number.ts","../../src/rules/type-rules/is-object.ts","../../src/rules/type-rules/is-record.ts","../../src/rules/type-rules/is-string.ts","../../src/rules/type-rules/is-tuple.ts","../../src/rules/type-rules/is-undefined.ts","../../src/rules/utility-rules/all-of.ts","../../src/rules/utility-rules/exists.ts","../../src/rules/utility-rules/get-length.ts","../../src/rules/utility-rules/one-of.ts","../../src/rules/utility-rules/optional.ts","../../src/rules/utility-rules/pipe.ts","../../src/rules/utility-rules/required.ts"],"version":"5.8.3"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valgen",
3
3
  "description": "Fast runtime type validator, converter and io (encoding/decoding) library",
4
- "version": "5.15.0",
4
+ "version": "5.15.2",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
7
7
  "dependencies": {
@@ -0,0 +1,9 @@
1
+ import validatorJS from '@browsery/validator';
2
+ import { type ValidationOptions } from '../../core/index.js';
3
+ export interface IsTimeOptions extends ValidationOptions, validatorJS.IsTimeOptions {
4
+ }
5
+ /**
6
+ * Validates if value is a time formatted string
7
+ * @validator isTime
8
+ */
9
+ export declare function isTime(options?: IsTimeOptions): import("../../core/validator.js").Validator<string, string, import("../../core/types.js").ExecutionOptions>;
@@ -21,6 +21,7 @@ export * from './format-rules/is-mobile-phone.js';
21
21
  export * from './format-rules/is-object-id.js';
22
22
  export * from './format-rules/is-passport-number.js';
23
23
  export * from './format-rules/is-port.js';
24
+ export * from './format-rules/is-time.js';
24
25
  export * from './format-rules/is-url.js';
25
26
  export * from './format-rules/is-uuid.js';
26
27
  export * from './format-rules/is-vat-number.js';
@@ -9,42 +9,30 @@ export declare function range<T extends RangeInput>(minValue: T, maxValue: T, op
9
9
  * Checks if value is grater than "minValue"
10
10
  * @validator iGt
11
11
  */
12
- export declare function isGt(minValue: number, options?: ValidationOptions): Validator<number, number>;
13
- export declare function isGt(minValue: bigint, options?: ValidationOptions): Validator<bigint, bigint | number>;
14
- export declare function isGt(minValue: Date, options?: ValidationOptions): Validator<Date, Date>;
15
- export declare function isGt(minValue: string, options?: ValidationOptions & {
12
+ export declare function isGt<T extends RangeInput>(minValue: T, options?: ValidationOptions & {
16
13
  caseInsensitive?: boolean;
17
- }): Validator<string, string>;
14
+ }): Validator;
18
15
  /**
19
16
  * Checks if value is grater than or equal to minValue
20
17
  * @validator isGte
21
18
  */
22
- export declare function isGte(minValue: number, options?: ValidationOptions): Validator<number, number>;
23
- export declare function isGte(minValue: bigint, options?: ValidationOptions): Validator<bigint, bigint | number>;
24
- export declare function isGte(minValue: Date, options?: ValidationOptions): Validator<Date, Date>;
25
- export declare function isGte(minValue: string, options?: ValidationOptions & {
19
+ export declare function isGte<T extends RangeInput>(minValue: T, options?: ValidationOptions & {
26
20
  caseInsensitive?: boolean;
27
- }): Validator<string, string>;
21
+ }): Validator<T, T>;
28
22
  /**
29
23
  * Checks if number value is lover than maxValue
30
24
  * @validator isLt
31
25
  */
32
- export declare function isLt(maxValue: number, options?: ValidationOptions): Validator<number, number>;
33
- export declare function isLt(maxValue: bigint, options?: ValidationOptions): Validator<bigint, bigint | number>;
34
- export declare function isLt(maxValue: Date, options?: ValidationOptions): Validator<Date, Date>;
35
- export declare function isLt(maxValue: string, options?: ValidationOptions & {
26
+ export declare function isLt<T extends RangeInput>(maxValue: T, options?: ValidationOptions & {
36
27
  caseInsensitive?: boolean;
37
- }): Validator<string, string>;
28
+ }): Validator;
38
29
  /**
39
30
  * Checks if value is lover than or equal to maxValue
40
31
  * @validator isLte
41
32
  */
42
- export declare function isLte(maxValue: number, options?: ValidationOptions): Validator<number, number>;
43
- export declare function isLte(maxValue: bigint, options?: ValidationOptions): Validator<bigint, bigint | number>;
44
- export declare function isLte(maxValue: Date, options?: ValidationOptions): Validator<Date, Date>;
45
- export declare function isLte(maxValue: string, options?: ValidationOptions & {
33
+ export declare function isLte<T extends RangeInput>(maxValue: T, options?: ValidationOptions & {
46
34
  caseInsensitive?: boolean;
47
- }): Validator<string, string>;
35
+ }): Validator;
48
36
  /**
49
37
  * Checks the length is at least "minValue"
50
38
  * @validator lengthMin
@@ -1,7 +1,7 @@
1
1
  import { type ValidationOptions } from '../../core/index.js';
2
2
  /**
3
- * Validates if value is instance of "Date".
4
- * Converts input value to Date if coerce option is set to 'true'.
3
+ * Validates if value is an instance of "Date".
4
+ * Converts input value to Date if a coerce option is set to 'true'.
5
5
  * @validator isDate
6
6
  */
7
7
  export declare function isDate(options?: isDate.Options): import("../../core/validator.js").Validator<Date, string | number | Date, import("../../core/types.js").ExecutionOptions>;