valgen 5.10.0 → 5.13.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.
Files changed (108) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/cjs/core/context.js +2 -0
  3. package/cjs/core/validation-error.js +2 -1
  4. package/cjs/core/validator.js +12 -6
  5. package/cjs/rules/format-rules/is-alpha.js +5 -5
  6. package/cjs/rules/format-rules/is-ascii.js +3 -3
  7. package/cjs/rules/format-rules/is-base64.js +3 -3
  8. package/cjs/rules/format-rules/is-btc-address.js +3 -3
  9. package/cjs/rules/format-rules/is-credit-card.js +3 -3
  10. package/cjs/rules/format-rules/is-decimal.js +3 -3
  11. package/cjs/rules/format-rules/is-ean.js +3 -3
  12. package/cjs/rules/format-rules/is-email.js +8 -17
  13. package/cjs/rules/format-rules/is-eth-address.js +3 -3
  14. package/cjs/rules/format-rules/is-fqdn.js +3 -4
  15. package/cjs/rules/format-rules/is-hash.js +3 -3
  16. package/cjs/rules/format-rules/is-hex-color.js +3 -3
  17. package/cjs/rules/format-rules/is-hex.js +3 -3
  18. package/cjs/rules/format-rules/is-iban.js +5 -5
  19. package/cjs/rules/format-rules/is-ip.js +5 -5
  20. package/cjs/rules/format-rules/is-issn.js +3 -4
  21. package/cjs/rules/format-rules/is-jwt.js +3 -3
  22. package/cjs/rules/format-rules/is-lowercase.js +5 -5
  23. package/cjs/rules/format-rules/is-mac-address.js +3 -4
  24. package/cjs/rules/format-rules/is-mobile-phone.js +3 -3
  25. package/cjs/rules/format-rules/is-object-id.js +2 -2
  26. package/cjs/rules/format-rules/is-passport-number.js +3 -3
  27. package/cjs/rules/format-rules/is-port.js +6 -4
  28. package/cjs/rules/format-rules/is-url.js +3 -3
  29. package/cjs/rules/format-rules/is-uuid.js +3 -3
  30. package/cjs/rules/format-rules/is-vat-number.js +3 -3
  31. package/cjs/rules/format-rules/matches.js +1 -1
  32. package/cjs/rules/logical-rules/is-defined.js +1 -1
  33. package/cjs/rules/logical-rules/is-empty.js +12 -12
  34. package/cjs/rules/logical-rules/range.js +5 -5
  35. package/cjs/rules/type-rules/is-array.js +6 -2
  36. package/cjs/rules/type-rules/is-bigint.js +1 -2
  37. package/cjs/rules/type-rules/is-boolean.js +1 -2
  38. package/cjs/rules/type-rules/is-date.js +4 -6
  39. package/cjs/rules/type-rules/is-integer.js +1 -6
  40. package/cjs/rules/type-rules/is-null.js +1 -1
  41. package/cjs/rules/type-rules/is-number.js +1 -6
  42. package/cjs/rules/type-rules/is-object.js +1 -1
  43. package/cjs/rules/type-rules/is-record.js +6 -4
  44. package/cjs/rules/type-rules/is-string.js +1 -1
  45. package/cjs/rules/type-rules/is-tuple.js +1 -1
  46. package/cjs/rules/type-rules/is-undefined.js +1 -1
  47. package/cjs/rules/utility-rules/get-length.js +1 -1
  48. package/cjs/rules/utility-rules/required.js +1 -1
  49. package/cjs/tsconfig-build-cjs.tsbuildinfo +1 -1
  50. package/esm/core/context.js +2 -0
  51. package/esm/core/validation-error.js +2 -1
  52. package/esm/core/validator.js +12 -6
  53. package/esm/rules/format-rules/is-alpha.js +3 -3
  54. package/esm/rules/format-rules/is-ascii.js +2 -2
  55. package/esm/rules/format-rules/is-base64.js +2 -2
  56. package/esm/rules/format-rules/is-btc-address.js +2 -2
  57. package/esm/rules/format-rules/is-credit-card.js +2 -2
  58. package/esm/rules/format-rules/is-decimal.js +2 -2
  59. package/esm/rules/format-rules/is-ean.js +2 -2
  60. package/esm/rules/format-rules/is-email.js +2 -11
  61. package/esm/rules/format-rules/is-eth-address.js +2 -2
  62. package/esm/rules/format-rules/is-fqdn.js +2 -3
  63. package/esm/rules/format-rules/is-hash.js +2 -2
  64. package/esm/rules/format-rules/is-hex-color.js +2 -2
  65. package/esm/rules/format-rules/is-hex.js +2 -2
  66. package/esm/rules/format-rules/is-iban.js +3 -3
  67. package/esm/rules/format-rules/is-ip.js +3 -3
  68. package/esm/rules/format-rules/is-issn.js +2 -3
  69. package/esm/rules/format-rules/is-jwt.js +2 -2
  70. package/esm/rules/format-rules/is-lowercase.js +3 -3
  71. package/esm/rules/format-rules/is-mac-address.js +2 -3
  72. package/esm/rules/format-rules/is-mobile-phone.js +2 -2
  73. package/esm/rules/format-rules/is-object-id.js +2 -2
  74. package/esm/rules/format-rules/is-passport-number.js +2 -2
  75. package/esm/rules/format-rules/is-port.js +5 -3
  76. package/esm/rules/format-rules/is-url.js +2 -2
  77. package/esm/rules/format-rules/is-uuid.js +2 -2
  78. package/esm/rules/format-rules/is-vat-number.js +2 -2
  79. package/esm/rules/format-rules/matches.js +1 -1
  80. package/esm/rules/logical-rules/is-defined.js +1 -1
  81. package/esm/rules/logical-rules/is-empty.js +12 -12
  82. package/esm/rules/logical-rules/range.js +5 -5
  83. package/esm/rules/type-rules/is-array.js +6 -2
  84. package/esm/rules/type-rules/is-bigint.js +1 -2
  85. package/esm/rules/type-rules/is-boolean.js +1 -2
  86. package/esm/rules/type-rules/is-date.js +4 -6
  87. package/esm/rules/type-rules/is-integer.js +1 -6
  88. package/esm/rules/type-rules/is-null.js +1 -1
  89. package/esm/rules/type-rules/is-number.js +1 -6
  90. package/esm/rules/type-rules/is-object.js +1 -1
  91. package/esm/rules/type-rules/is-record.js +6 -4
  92. package/esm/rules/type-rules/is-string.js +1 -1
  93. package/esm/rules/type-rules/is-tuple.js +1 -1
  94. package/esm/rules/type-rules/is-undefined.js +1 -1
  95. package/esm/rules/utility-rules/get-length.js +1 -1
  96. package/esm/rules/utility-rules/required.js +1 -1
  97. package/esm/tsconfig-build-esm.tsbuildinfo +1 -1
  98. package/package.json +5 -5
  99. package/types/core/context.d.ts +1 -0
  100. package/types/index.d.cts +2 -2
  101. package/types/index.d.ts +2 -2
  102. package/types/rules/format-rules/is-base64.d.ts +1 -1
  103. package/types/rules/format-rules/is-credit-card.d.ts +1 -1
  104. package/types/rules/format-rules/is-hash.d.ts +1 -1
  105. package/types/rules/format-rules/is-mobile-phone.d.ts +1 -1
  106. package/types/rules/format-rules/is-object-id.d.ts +1 -1
  107. package/types/rules/format-rules/is-port.d.ts +1 -1
  108. package/types/rules/format-rules/is-url.d.ts +1 -1
@@ -7,7 +7,7 @@ export function isNull(options) {
7
7
  return validator('isNull', (input, context, _this) => {
8
8
  if (input === null)
9
9
  return input;
10
- context.fail(_this, `{{label}} is not null`, input);
10
+ context.fail(_this, `Value must be null`, input);
11
11
  }, options);
12
12
  }
13
13
  /**
@@ -19,11 +19,6 @@ export function isNumber(options) {
19
19
  }
20
20
  if (typeof output === 'number' && !isNaN(output))
21
21
  return output;
22
- const t = typeof input === 'bigint'
23
- ? 'BigInt '
24
- : typeof input === 'string'
25
- ? 'String '
26
- : '';
27
- context.fail(_this, `${t}"{{value}}" is not a valid number value`, input);
22
+ context.fail(_this, `Value must be a number`, input);
28
23
  }, options);
29
24
  }
@@ -42,7 +42,7 @@ export function isObject(schema, options) {
42
42
  if (typeof output === 'string' && coerce)
43
43
  output = JSON.parse(output);
44
44
  if (!(output && typeof output === 'object')) {
45
- context.fail(_this, `"{{value}}" is not an object`, input);
45
+ context.fail(_this, `Value must be an object`, input);
46
46
  return;
47
47
  }
48
48
  const keys = [...Object.keys(output), ...schemaKeys];
@@ -7,7 +7,7 @@ import { validator, } from '../../core/index.js';
7
7
  export function isRecord(keyRule, valueRule, options) {
8
8
  return validator('isRecord', (input, context, _this) => {
9
9
  if (!(input && typeof input === 'object')) {
10
- context.fail(_this, `{{label}} must be an object`, input);
10
+ context.fail(_this, `Value must be an object`, input);
11
11
  return;
12
12
  }
13
13
  const keyContext = context.extend();
@@ -23,9 +23,11 @@ export function isRecord(keyRule, valueRule, options) {
23
23
  k = keys[i];
24
24
  v = input[k];
25
25
  // Validate key
26
- keyContext.property = '@' + k;
27
- keyContext.location = location + (location ? '.@' : '@') + k;
28
- k = keyRule(k, keyContext);
26
+ k = keyRule(k, {
27
+ onFail(issue) {
28
+ return `${k} is not a valid key. ` + issue.message;
29
+ },
30
+ }, keyContext);
29
31
  // Validate value
30
32
  valueContext.property = k;
31
33
  valueContext.location = location + (location ? '.' : '') + k;
@@ -20,7 +20,7 @@ export function isString(options) {
20
20
  }
21
21
  if (typeof output === 'string')
22
22
  return output;
23
- context.fail(_this, `"{{value}}" is not a string`, input);
23
+ context.fail(_this, `Value must be a string`, input);
24
24
  }, options);
25
25
  }
26
26
  export function stringReplace(searchValue, replacer) {
@@ -6,7 +6,7 @@ export function isTuple(items, options) {
6
6
  if (output != null && coerce && !Array.isArray(output))
7
7
  output = [output];
8
8
  if (!Array.isArray(input)) {
9
- context.fail(_this, `"{{value}}" is not a valid tuple`, input);
9
+ context.fail(_this, `Value must be a tuple`, input);
10
10
  return;
11
11
  }
12
12
  const location = context.location || '';
@@ -9,6 +9,6 @@ export function isUndefined(options) {
9
9
  return undefined;
10
10
  if (input === undefined)
11
11
  return;
12
- context.fail(_this, `{{label}} mustn't be defined`, input);
12
+ context.fail(_this, `Value must be undefined`, input);
13
13
  }, options);
14
14
  }
@@ -21,6 +21,6 @@ export function getLength() {
21
21
  typeof input.size === 'number') {
22
22
  return input.size;
23
23
  }
24
- context.fail(_this, `Unable to get length of {{label}}`, input);
24
+ context.fail(_this, `Unable to get length`, input);
25
25
  });
26
26
  }
@@ -6,7 +6,7 @@ import { validator, } from '../../core/index.js';
6
6
  export function required(nested, options) {
7
7
  return validator('required', (input, context, _this) => {
8
8
  if (input == null) {
9
- context.fail(_this, `{{label}} is required`, input);
9
+ context.fail(_this, `Value required`, input);
10
10
  return;
11
11
  }
12
12
  return nested(input, context);
@@ -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/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/exists.ts","../../src/rules/utility-rules/get-length.ts","../../src/rules/utility-rules/optional.ts","../../src/rules/utility-rules/pipe.ts","../../src/rules/utility-rules/required.ts","../../src/rules/utility-rules/union.ts"],"version":"5.6.2"}
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/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/exists.ts","../../src/rules/utility-rules/get-length.ts","../../src/rules/utility-rules/optional.ts","../../src/rules/utility-rules/pipe.ts","../../src/rules/utility-rules/required.ts","../../src/rules/utility-rules/union.ts"],"version":"5.7.3"}
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "valgen",
3
3
  "description": "Fast runtime type validator, converter and io (encoding/decoding) library",
4
- "version": "5.10.0",
4
+ "version": "5.13.0",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
7
7
  "dependencies": {
8
- "date-fns": "^3.6.0",
9
- "ts-gems": "^3.5.0",
10
- "tslib": "^2.7.0",
11
- "validator": "^13.12.0"
8
+ "@browsery/validator": "^13.12.0-r1",
9
+ "date-fns": "^4.1.0",
10
+ "ts-gems": "^3.11.3",
11
+ "tslib": "^2.8.1"
12
12
  },
13
13
  "type": "module",
14
14
  "exports": {
@@ -1,6 +1,7 @@
1
1
  import type { ErrorIssue, ExecutionOptions, OnFailFunction } from './types.js';
2
2
  import type { Validator } from './validator.js';
3
3
  export declare class Context implements ExecutionOptions {
4
+ isRoot: boolean;
4
5
  errors: ErrorIssue[];
5
6
  maxErrors?: number;
6
7
  onFail?: OnFailFunction;
package/types/index.d.cts CHANGED
@@ -19,7 +19,7 @@ declare const isDefined: import("./core/validator.js").Validator<any, unknown, i
19
19
  declare const isUndefined: import("./core/validator.js").Validator<any, unknown, import("./core/types.js").ExecutionOptions>;
20
20
  declare const isNumber: import("./core/validator.js").Validator<number, unknown, import("./core/types.js").ExecutionOptions>;
21
21
  declare const isObject: vg.IsObject.Validator<object, string | object>;
22
- declare const isObjectId: import("./core/validator.js").Validator<string | vg.ObjectIdLike | Uint8Array, unknown, import("./core/types.js").ExecutionOptions>;
22
+ declare const isObjectId: import("./core/validator.js").Validator<string | vg.ObjectIdLike | Uint8Array<ArrayBufferLike>, unknown, import("./core/types.js").ExecutionOptions>;
23
23
  declare const isString: import("./core/validator.js").Validator<string, unknown, import("./core/types.js").ExecutionOptions>;
24
24
  declare const isUUID: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
25
25
  declare const isUUID1: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
@@ -32,7 +32,7 @@ declare const isMobilePhone: import("./core/validator.js").Validator<string, str
32
32
  declare const isIP: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
33
33
  declare const isIPRange: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
34
34
  declare const isMACAddress: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
35
- declare const isPort: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
35
+ declare const isPort: import("./core/validator.js").Validator<number, string | number, import("./core/types.js").ExecutionOptions>;
36
36
  declare const isURL: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
37
37
  declare const isBase64: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
38
38
  declare const isSWIFT: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
package/types/index.d.ts CHANGED
@@ -19,7 +19,7 @@ declare const isDefined: import("./core/validator.js").Validator<any, unknown, i
19
19
  declare const isUndefined: import("./core/validator.js").Validator<any, unknown, import("./core/types.js").ExecutionOptions>;
20
20
  declare const isNumber: import("./core/validator.js").Validator<number, unknown, import("./core/types.js").ExecutionOptions>;
21
21
  declare const isObject: vg.IsObject.Validator<object, string | object>;
22
- declare const isObjectId: import("./core/validator.js").Validator<string | vg.ObjectIdLike | Uint8Array, unknown, import("./core/types.js").ExecutionOptions>;
22
+ declare const isObjectId: import("./core/validator.js").Validator<string | vg.ObjectIdLike | Uint8Array<ArrayBufferLike>, unknown, import("./core/types.js").ExecutionOptions>;
23
23
  declare const isString: import("./core/validator.js").Validator<string, unknown, import("./core/types.js").ExecutionOptions>;
24
24
  declare const isUUID: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
25
25
  declare const isUUID1: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
@@ -32,7 +32,7 @@ declare const isMobilePhone: import("./core/validator.js").Validator<string, str
32
32
  declare const isIP: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
33
33
  declare const isIPRange: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
34
34
  declare const isMACAddress: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
35
- declare const isPort: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
35
+ declare const isPort: import("./core/validator.js").Validator<number, string | number, import("./core/types.js").ExecutionOptions>;
36
36
  declare const isURL: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
37
37
  declare const isBase64: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
38
38
  declare const isSWIFT: import("./core/validator.js").Validator<string, string, import("./core/types.js").ExecutionOptions>;
@@ -1,4 +1,4 @@
1
- import * as validatorJS from 'validator';
1
+ import validatorJS from '@browsery/validator';
2
2
  import { type ValidationOptions } from '../../core/index.js';
3
3
  export interface Base64ValidatorOptions extends ValidationOptions, validatorJS.IsBase64Options {
4
4
  }
@@ -1,4 +1,4 @@
1
- import * as validatorJS from 'validator';
1
+ import validatorJS from '@browsery/validator';
2
2
  import { type ValidationOptions } from '../../core/index.js';
3
3
  export interface CreditCardValidatorOptions extends ValidationOptions, validatorJS.IsCreditCardOptions {
4
4
  }
@@ -1,4 +1,4 @@
1
- import * as validatorJS from 'validator';
1
+ import validatorJS from '@browsery/validator';
2
2
  import { type ValidationOptions } from '../../core/index.js';
3
3
  export type HashAlgorithm = validatorJS.HashAlgorithm;
4
4
  /**
@@ -1,4 +1,4 @@
1
- import * as validatorJS from 'validator';
1
+ import validatorJS from '@browsery/validator';
2
2
  import { type ValidationOptions } from '../../core/index.js';
3
3
  export interface IsMobilePhoneOptions extends ValidationOptions {
4
4
  /**
@@ -7,4 +7,4 @@ export declare interface ObjectIdLike {
7
7
  * Validates if value is an "ObjectId".
8
8
  * @validator isObjectId
9
9
  */
10
- export declare function isObjectId(options?: ValidationOptions): import("../../core/validator.js").Validator<string | ObjectIdLike | Uint8Array, unknown, import("../../core/types.js").ExecutionOptions>;
10
+ export declare function isObjectId(options?: ValidationOptions): import("../../core/validator.js").Validator<string | ObjectIdLike | Uint8Array<ArrayBufferLike>, unknown, import("../../core/types.js").ExecutionOptions>;
@@ -3,4 +3,4 @@ import { type ValidationOptions } from '../../core/index.js';
3
3
  * Validates if value is a port number
4
4
  * @validator isPort
5
5
  */
6
- export declare function isPort(options?: ValidationOptions): import("../../core/validator.js").Validator<string, string, import("../../core/types.js").ExecutionOptions>;
6
+ export declare function isPort(options?: ValidationOptions): import("../../core/validator.js").Validator<number, string | number, import("../../core/types.js").ExecutionOptions>;
@@ -1,4 +1,4 @@
1
- import * as validatorJS from 'validator';
1
+ import validatorJS from '@browsery/validator';
2
2
  import { type ValidationOptions } from '../../core/index.js';
3
3
  export interface IsURLOptions extends ValidationOptions, validatorJS.IsURLOptions {
4
4
  }