Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-validator

Package Overview
Dependencies
Maintainers
4
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-validator - npm Package Compare versions

Comparing version 6.13.0 to 6.14.0

6

declarations/validator.d.ts

@@ -28,3 +28,6 @@ declare module 'validator' {

export function isBIC(str: string): boolean;
export function isBoolean(str: string): boolean;
export function isBoolean(
str: string,
options?: import('../src/options').IsBooleanOptions,
): boolean;
export function isBtcAddress(str: string): boolean;

@@ -76,2 +79,3 @@ export function isByteLength(

export function isISO31661Alpha3(str: string): boolean;
export function isISO4217(str: string): boolean;
export function isISRC(str: string): boolean;

@@ -78,0 +82,0 @@ export function isIn(str: string, values: readonly any[]): boolean;

4

package.json

@@ -10,3 +10,3 @@ {

],
"version": "6.13.0",
"version": "6.14.0",
"homepage": "https://express-validator.github.io",

@@ -47,3 +47,3 @@ "license": "MIT",

"lodash": "^4.17.21",
"validator": "^13.6.0"
"validator": "^13.7.0"
},

@@ -50,0 +50,0 @@ "devDependencies": {

@@ -40,2 +40,7 @@ import { CustomValidator } from '../base';

isBIC(): Chain;
/**
* There are basically three levels of strictness for this validator.
* Passing `{ strict: true }` as option only passes the validation if the value is a JS bool. (It also overrides the loose property of the options).
* Passing `{ loose: true|false }` along with no `strict` prop of with `strict` falsy follows the behaviour specified in validator.js docs.
*/
isBoolean(options?: Options.IsBooleanOptions): Chain;

@@ -73,2 +78,3 @@ isBtcAddress(): Chain;

isISO31661Alpha3(): Chain;
isISO4217(): Chain;
isISRC(): Chain;

@@ -75,0 +81,0 @@ isIn(values: readonly any[]): Chain;

@@ -100,2 +100,7 @@ "use strict";

}
/**
* There are basically three levels of strictness for this validator.
* Passing `{ strict: true }` as option only passes the validation if the value is a JS bool. (It also overrides the loose property of the options).
* Passing `{ loose: true|false }` along with no `strict` prop of with `strict` falsy follows the behaviour specified in validator.js docs.
*/
isBoolean(options) {

@@ -107,3 +112,3 @@ if (options === null || options === void 0 ? void 0 : options.strict) {

}
return this.addStandardValidation(validator.isBoolean);
return this.addStandardValidation(validator.isBoolean, options);
}

@@ -203,2 +208,5 @@ isBtcAddress() {

}
isISO4217() {
return this.addStandardValidation(validator.isISO4217);
}
isISRC() {

@@ -205,0 +213,0 @@ return this.addStandardValidation(validator.isISRC);

@@ -64,2 +64,3 @@ import { CustomValidator, DynamicMessageCreator } from '../base';

isISO31661Alpha3(): Return;
isISO4217(): Return;
isISRC(): Return;

@@ -66,0 +67,0 @@ isIn(values: readonly any[]): Return;

export declare type URLProtocol = 'http' | 'https' | 'ftp' | string;
export declare type UUIDVersion = 3 | 4 | 5 | '3' | '4' | '5' | 'all';
export declare type UUIDVersion = 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5' | 'all';
export declare type IPVersion = 4 | 6;
export declare type AlphaLocale = 'ar' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-QA' | 'ar-QM' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'az-AZ' | 'bg-BG' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'el-GR' | 'en-AU' | 'en-GB' | 'en-HK' | 'en-IN' | 'en-NZ' | 'en-US' | 'en-ZA' | 'en-ZM' | 'es-ES' | 'fa-AF' | 'fa-IR' | 'fr-FR' | 'he' | 'hu-HU' | 'id-ID' | 'it-IT' | 'ku-IQ' | 'nb-NO' | 'nl-NL' | 'nn-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ru-RU' | 'sk-SK' | 'sl-SI' | 'sr-RS' | 'sr-RS@latin' | 'sv-SE' | 'th-TH' | 'tr-TR' | 'uk-UA' | 'vi-VN';
export declare type AlphanumericLocale = 'ar' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-QA' | 'ar-QM' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'az-AZ' | 'bg-BG' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'el-GR' | 'en-AU' | 'en-GB' | 'en-HK' | 'en-IN' | 'en-NZ' | 'en-US' | 'en-ZA' | 'en-ZM' | 'es-ES' | 'fa-AF' | 'fa-IR' | 'fr-FR' | 'fr-BE' | 'he' | 'hu-HU' | 'it-IT' | 'id-ID' | 'ku-IQ' | 'nb-NO' | 'nl-BE' | 'nl-NL' | 'nn-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ru-RU' | 'sk-SK' | 'sl-SI' | 'sr-RS' | 'sr-RS@latin' | 'sv-SE' | 'th-TH' | 'tr-TR' | 'uk-UA' | 'vi-VN';
export declare type MobilePhoneLocale = 'any' | 'am-AM' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-OM' | 'ar-SA' | 'ar-SY' | 'ar-TN' | 'az-AZ' | 'be-BY' | 'bg-BG' | 'bn-BD' | 'bs-BA' | 'cs-CZ' | 'de-AT' | 'de-CH' | 'de-DE' | 'de-LU' | 'da-DK' | 'el-GR' | 'en-AU' | 'en-CA' | 'en-GB' | 'en-GG' | 'en-GH' | 'en-HK' | 'en-HN' | 'en-IE' | 'en-IN' | 'en-KE' | 'en-MT' | 'en-MU' | 'en-NG' | 'en-NZ' | 'en-PH' | 'en-PK' | 'en-RW' | 'en-SG' | 'en-SL' | 'en-TZ' | 'en-UG' | 'en-US' | 'en-ZA' | 'en-ZM' | 'en-ZW' | 'es-AR' | 'es-BO' | 'es-CL' | 'es-CO' | 'es-CR' | 'es-DO' | 'es-EC' | 'es-ES' | 'es-MX' | 'es-PA' | 'es-PE' | 'es-PY' | 'es-UY' | 'et-EE' | 'fa-IR' | 'fi-FI' | 'fj-FJ' | 'fo-FO' | 'fr-BE' | 'fr-CH' | 'fr-FR' | 'fr-GF' | 'fr-GP' | 'fr-MQ' | 'fr-RE' | 'ga-IE' | 'he-IL' | 'hu-HU' | 'id-ID' | 'it-CH' | 'it-IT' | 'it-SM' | 'ja-JP' | 'ka-GE' | 'kk-KZ' | 'kl-GL' | 'lt-LT' | 'lv-LV' | 'ms-MY' | 'mz-MZ' | 'nb-NO' | 'nl-NL' | 'ne-NP' | 'nn-NO' | 'pl-PL' | 'pt-AO' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'ru-RU' | 'sk-SK' | 'sl-SI' | 'sq-AL' | 'sr-RS' | 'sv-SE' | 'th-TH' | 'tr-TR' | 'uk-UA' | 'uz-Uz' | 'vi-VN' | 'zh-CN' | 'zh-HK' | 'zh-TW';
export declare type PostalCodeLocale = 'any' | 'AD' | 'AT' | 'AU' | 'AZ' | 'BE' | 'BG' | 'BR' | 'BY' | 'CA' | 'CH' | 'CN' | 'CZ' | 'DE' | 'DK' | 'DO' | 'DZ' | 'EE' | 'ES' | 'FI' | 'FR' | 'GB' | 'GR' | 'HR' | 'HT' | 'HU' | 'ID' | 'IL' | 'IN' | 'IS' | 'IR' | 'IT' | 'JP' | 'KE' | 'KR' | 'LI' | 'LT' | 'LU' | 'LV' | 'MT' | 'MX' | 'MY' | 'NL' | 'NO' | 'NP' | 'NZ' | 'PL' | 'PR' | 'PT' | 'RO' | 'RU' | 'SA' | 'SE' | 'SG' | 'SI' | 'TH' | 'TN' | 'TW' | 'UA' | 'US' | 'ZA' | 'ZM';
export declare type AlphaLocale = 'ar' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-QA' | 'ar-QM' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'az-AZ' | 'bg-BG' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'el-GR' | 'en-AU' | 'en-GB' | 'en-HK' | 'en-IN' | 'en-NZ' | 'en-US' | 'en-ZA' | 'en-ZM' | 'es-ES' | 'fa-AF' | 'fa-IR' | 'fi-FI' | 'fr-FR' | 'he' | 'hi-IN' | 'hu-HU' | 'id-ID' | 'it-IT' | 'ku-IQ' | 'nb-NO' | 'nl-NL' | 'nn-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ru-RU' | 'sk-SK' | 'sl-SI' | 'sr-RS' | 'sr-RS@latin' | 'sv-SE' | 'th-TH' | 'tr-TR' | 'uk-UA' | 'vi-VN';
export declare type AlphanumericLocale = 'ar' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-QA' | 'ar-QM' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'az-AZ' | 'bg-BG' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'el-GR' | 'en-AU' | 'en-GB' | 'en-HK' | 'en-IN' | 'en-NZ' | 'en-US' | 'en-ZA' | 'en-ZM' | 'es-ES' | 'fa-AF' | 'fa-IR' | 'fi-FI' | 'fr-FR' | 'fr-BE' | 'he' | 'hi-IN' | 'hu-HU' | 'it-IT' | 'id-ID' | 'ku-IQ' | 'nb-NO' | 'nl-BE' | 'nl-NL' | 'nn-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ru-RU' | 'sk-SK' | 'sl-SI' | 'sr-RS' | 'sr-RS@latin' | 'sv-SE' | 'th-TH' | 'tr-TR' | 'uk-UA' | 'vi-VN';
export declare type MobilePhoneLocale = 'any' | 'am-AM' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-OM' | 'ar-PS' | 'ar-SA' | 'ar-SY' | 'ar-TN' | 'az-AZ' | 'be-BY' | 'bg-BG' | 'bn-BD' | 'bs-BA' | 'cs-CZ' | 'de-AT' | 'de-CH' | 'de-DE' | 'de-LU' | 'da-DK' | 'dz-BT' | 'el-GR' | 'en-AU' | 'en-BM' | 'en-BW' | 'en-CA' | 'en-GB' | 'en-GG' | 'en-GH' | 'en-GY' | 'en-HK' | 'en-HN' | 'en-IE' | 'en-IN' | 'en-KE' | 'en-KI' | 'en-MT' | 'en-MU' | 'en-NA' | 'en-NG' | 'en-NZ' | 'en-PH' | 'en-PK' | 'en-RW' | 'en-SG' | 'en-SL' | 'en-TZ' | 'en-UG' | 'en-US' | 'en-ZA' | 'en-ZM' | 'en-ZW' | 'es-AR' | 'es-BO' | 'es-CL' | 'es-CO' | 'es-CR' | 'es-CU' | 'es-DO' | 'es-EC' | 'es-ES' | 'es-MX' | 'es-PA' | 'es-PE' | 'es-PY' | 'es-SV' | 'es-UY' | 'es-VE' | 'et-EE' | 'fa-IR' | 'fi-FI' | 'fj-FJ' | 'fo-FO' | 'fr-BE' | 'fr-BF' | 'fr-CH' | 'fr-CM' | 'fr-FR' | 'fr-GF' | 'fr-GP' | 'fr-MQ' | 'fr-PF' | 'fr-RE' | 'ga-IE' | 'he-IL' | 'hu-HU' | 'id-ID' | 'it-CH' | 'it-IT' | 'it-SM' | 'ja-JP' | 'ka-GE' | 'kk-KZ' | 'kl-GL' | 'lt-LT' | 'lv-LV' | 'ms-MY' | 'mz-MZ' | 'nb-NO' | 'nl-BE' | 'nl-NL' | 'ne-NP' | 'nn-NO' | 'pl-PL' | 'pt-AO' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'ru-RU' | 'si-LK' | 'sk-SK' | 'sl-SI' | 'sq-AL' | 'sr-RS' | 'sv-SE' | 'tg-TJ' | 'th-TH' | 'tk-TM' | 'tr-TR' | 'uk-UA' | 'uz-Uz' | 'vi-VN' | 'zh-CN' | 'zh-HK' | 'zh-TW';
export declare type PostalCodeLocale = 'any' | 'AD' | 'AT' | 'AU' | 'AZ' | 'BE' | 'BG' | 'BR' | 'BY' | 'CA' | 'CH' | 'CN' | 'CZ' | 'DE' | 'DK' | 'DO' | 'DZ' | 'EE' | 'ES' | 'FI' | 'FR' | 'GB' | 'GR' | 'HR' | 'HT' | 'HU' | 'ID' | 'IL' | 'IN' | 'IS' | 'IR' | 'IT' | 'JP' | 'KE' | 'KR' | 'LI' | 'LK' | 'LT' | 'LU' | 'LV' | 'MT' | 'MX' | 'MY' | 'NL' | 'NO' | 'NP' | 'NZ' | 'PL' | 'PR' | 'PT' | 'RO' | 'RU' | 'SA' | 'SE' | 'SG' | 'SI' | 'TH' | 'TN' | 'TW' | 'UA' | 'US' | 'ZA' | 'ZM';
export declare type HashAlgorithm = 'md4' | 'md5' | 'sha1' | 'sha256' | 'sha384' | 'sha512' | 'ripemd128' | 'ripemd160' | 'tiger128' | 'tiger160' | 'tiger192' | 'crc32' | 'crc32b';
export declare type IdentityCardLocale = 'any' | 'ar-LY' | 'ar-TN' | 'ES' | 'he-IL' | 'IN' | 'IT' | 'IR' | 'MZ' | 'NO' | 'zh-CN' | 'zh-TW';
export declare type PassportCountryCode = 'AM' | 'AR' | 'AT' | 'AU' | 'BE' | 'BG' | 'BY' | 'BR' | 'CA' | 'CH' | 'CN' | 'CY' | 'CZ' | 'DE' | 'DK' | 'DZ' | 'EE' | 'ES' | 'FI' | 'FR' | 'GB' | 'GR' | 'HR' | 'HU' | 'IE' | 'IN' | 'IR' | 'IS' | 'IT' | 'JP' | 'KR' | 'LT' | 'LU' | 'LV' | 'LY' | 'MT' | 'MY' | 'MZ' | 'NL' | 'PO' | 'PT' | 'RO' | 'RU' | 'SE' | 'SL' | 'SK' | 'TR' | 'UA' | 'US';
export declare type IsLicensePlateLocale = 'de-DE' | 'de-LI' | 'pt-BR' | 'pt-PT' | 'sq-AL' | 'any';
export declare type IdentityCardLocale = 'any' | 'ar-LY' | 'ar-TN' | 'ES' | 'FI' | 'he-IL' | 'IN' | 'IT' | 'IR' | 'MZ' | 'NO' | 'PL' | 'TH' | 'zh-CN' | 'zh-TW';
export declare type PassportCountryCode = 'AM' | 'AR' | 'AT' | 'AU' | 'BE' | 'BG' | 'BY' | 'BR' | 'CA' | 'CH' | 'CN' | 'CY' | 'CZ' | 'DE' | 'DK' | 'DZ' | 'EE' | 'ES' | 'FI' | 'FR' | 'GB' | 'GR' | 'HR' | 'HU' | 'ID' | 'IE' | 'IN' | 'IR' | 'IS' | 'IT' | 'JP' | 'KR' | 'LT' | 'LU' | 'LV' | 'LY' | 'MT' | 'MY' | 'MZ' | 'NL' | 'PL' | 'PO' | 'PT' | 'RO' | 'RU' | 'SE' | 'SL' | 'SK' | 'TR' | 'UA' | 'US';
export declare type IsLicensePlateLocale = 'cs-CZ' | 'de-DE' | 'de-LI' | 'fi-FI' | 'pt-BR' | 'pt-PT' | 'sq-AL' | 'any';
export declare type TaxIDLocale = 'bg-BG' | 'cs-CZ' | 'de-AT' | 'de-DE' | 'dk-DK' | 'el-CY' | 'el-GR' | 'en-GB' | 'en-IE' | 'en-US' | 'es-ES' | 'et-EE' | 'fi-FI' | 'fr-BE' | 'fr-FR' | 'fr-LU' | 'hr-HR' | 'hu-HU' | 'it-IT' | 'lb-LU' | 'lt-LT' | 'lv-LV' | 'mt-MT' | 'nl-BE' | 'nl-NL' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'sk-SK' | 'sl-SI' | 'sv-SE';
export declare type VATCountryCode = 'GB' | 'IT';
export declare type VATCountryCode = 'GB' | 'IT' | 'NL';
export interface MinMaxOptions {

@@ -25,3 +25,4 @@ min?: number;

* {
* ignoreCase: false
* ignoreCase: false,
* minOccurrences: 1
* }

@@ -31,2 +32,3 @@ */

ignoreCase?: boolean;
minOccurrences?: number;
}

@@ -52,2 +54,3 @@ export interface IsAlphaOptions {

* strict: false
* loose: false
* }

@@ -57,2 +60,3 @@ */

strict?: boolean;
loose?: boolean;
}

@@ -120,2 +124,3 @@ /**

blacklisted_chars?: string;
host_blacklist?: string[];
}

@@ -140,3 +145,4 @@ /**

* allow_trailing_dot: false,
* allow_numeric_tld: false
* allow_numeric_tld: false,
* allow_wildcard?: false
* }

@@ -148,3 +154,4 @@ */

allow_trailing_dot?: boolean;
allow_numeric_tld?: false;
allow_numeric_tld?: boolean;
allow_wildcard?: boolean;
}

@@ -276,3 +283,5 @@ export interface IsIntOptions extends MinMaxExtendedOptions {

* allow_protocol_relative_urls: false,
* validate_length: true
* validate_length: true,
* allow_fragments: true,
* allow_query_components: true
* }

@@ -294,2 +303,4 @@ */

validate_length?: boolean;
allow_fragments?: boolean;
allow_query_components?: boolean;
}

@@ -296,0 +307,0 @@ export interface NormalizeEmailOptions {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc