UNPKG

25.6 kBTypeScriptView Raw
1// Type definitions for validator.js v9.4
2// Project: https://github.com/chriso/validator.js
3// Definitions by: tgfjt <https://github.com/tgfjt>
4// Ilya Mochalov <https://github.com/chrootsu>
5// Ayman Nedjmeddine <https://github.com/IOAyman>
6// Louy Alakkad <https://github.com/louy>
7// Kacper Polak <https://github.com/kacepe>
8// Bonggyun Lee <https://github.com/deptno>
9// Naoto Yokoyama <https://github.com/builtinnya>
10// Philipp Katz <https://github.com/qqilihq>
11// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
12
13declare namespace ValidatorJS {
14 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" | "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" | "fr-FR" | "hu-HU" | "it-IT" | "nb-NO" | "nl-NL" | "nn-NO" | "pl-PL" | "pt-BR" | "pt-PT" | "ru-RU" | "sk-SK" | "sr-RS" | "sr-RS@latin" | "sv-SE" | "tr-TR" | "uk-UA";
15 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" | "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" | "fr-FR" | "hu-HU" | "it-IT" | "nb-NO" | "nl-NL" | "nn-NO" | "pl-PL" | "pt-BR" | "pt-PT" | "ru-RU" | "sk-SK" | "sr-RS" | "sr-RS@latin" | "sv-SE" | "tr-TR" | "uk-UA";
16 type DecimalLocale = "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" | "bg-BG" | "cs-CZ" | "da-DK" | "de-DE" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-ZA" | "en-ZM" | "es-ES" | "fr-FR" | "hu-HU" | "it-IT" | "nb-NO" | "nl-NL" | "nn-NO" | "pl-PL" | "pt-BR" | "pt-PT" | "ru-RU" | "sr-RS" | "sr-RS@latin" | "sv-SE" | "tr-TR" | "uk-UA";
17 type FloatLocale = "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" | "bg-BG" | "cs-CZ" | "da-DK" | "de-DE" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-ZA" | "en-ZM" | "es-ES" | "fr-FR" | "hu-HU" | "it-IT" | "nb-NO" | "nl-NL" | "nn-NO" | "pl-PL" | "pt-BR" | "pt-PT" | "ru-RU" | "sr-RS" | "sr-RS@latin" | "sv-SE" | "tr-TR" | "uk-UA";
18 type MobilePhoneLocale = "ar-AE" | "ar-DZ" | "ar-EG" | "ar-JO" | "ar-SA" | "ar-SY" | "be-BY" | "bg-BG" | "cs-CZ" | "de-DE" | "da-DK" | "el-GR" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-KE" | "en-NG" | "en-NZ" | "en-UG" | "en-RW" | "en-SG" | "en-TZ" | "en-PK" | "en-US" | "en-CA" | "en-ZA" | "en-ZM" | "es-ES" | "fa-IR" | "fi-FI" | "fo-FO" | "fr-FR" | "he-IL" | "hu-HU" | "id-ID" | "it-IT" | "ja-JP" | "kk-KZ" | "kl-GL" | "ko-KR" | "lt-LT" | "ms-MY" | "nb-NO" | "nn-NO" | "pl-PL" | "pt-PT" | "ro-RO" | "ru-RU" | "sk-SK" | "sr-RS" | "th-TH" | "tr-TR" | "uk-UA" | "vi-VN" | "zh-CN" | "zh-HK" | "zh-TW" | "any";
19 type PostalCodeLocale = "AT" | "AU" | "BE" | "BG" | "CA" | "CH" | "CZ" | "DE" | "DK" | "DZ" | "ES" | "FI" | "FR" | "GB" | "GR" | "IL" | "IN" | "IS" | "IT" | "JP" | "KE" | "LI" | "MX" | "NL" | "NO" | "PL" | "PT" | "RO" | "RU" | "SA" | "SE" | "TW" | "US" | "ZA" | "ZM" | "any"
20 type HashAlgorithm = "md4" | "md5" | "sha1" | "sha256" | "sha384" | "sha512" | "ripemd128" | "ripemd160" | "tiger128" | "tiger160" | "tiger192" | "crc32" | "crc32b";
21
22 interface ValidatorStatic {
23
24 // **************
25 // * Validators *
26 // **************
27
28 // check if the string contains the seed.
29 contains(str: string, elem: any): boolean;
30
31 // check if the string matches the comparison.
32 equals(str: string, comparison: string): boolean;
33
34 // check if the string is a date that's after the specified date (defaults to now).
35 isAfter(str: string, date?: string): boolean;
36
37 // check if the string contains only letters (a-zA-Z). Locale is one of ['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG',
38 // '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',
39 // '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',
40 // 'es-ES', 'fr-FR', 'hu-HU', 'it-IT', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sk-SK', 'sr-RS',
41 // 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA']) and defaults to en-US
42 isAlpha(str: string, locale?: AlphaLocale): boolean;
43
44 // check if the string contains only letters and numbers. Locale is one of ['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG',
45 // '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',
46 // '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',
47 // 'es-ES', 'fr-FR', 'hu-HU', 'it-IT', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sk-SK', 'sr-RS',
48 // 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA']) and defaults to en-US
49 isAlphanumeric(str: string, locale?: AlphanumericLocale): boolean;
50
51 // check if the string contains ASCII chars only.
52 isAscii(str: string): boolean;
53
54 // check if a string is base64 encoded.
55 isBase64(str: string): boolean;
56
57 // check if the string is a date that's before the specified date.
58 isBefore(str: string, date?: string): boolean;
59
60 // check if a string is a boolean.
61 isBoolean(str: string): boolean;
62
63 // check if the string's length (in bytes) falls in a range.
64 isByteLength(str: string, options: IsByteLengthOptions): boolean;
65 isByteLength(str: string, min: number, max?: number): boolean;
66
67 // check if the string is a credit card.
68 isCreditCard(str: string): boolean;
69
70 // check if the string is a valid currency amount.
71 isCurrency(str: string, options?: IsCurrencyOptions): boolean;
72
73 // check if the string is a data uri format (https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs)
74 isDataURI(str: string): boolean;
75
76 // check if the string represents a decimal number, such as 0.1, .3, 1.1, 1.00003, 4.0, etc.
77 isDecimal(str: string, options?: IsDecimalOptions): boolean;
78
79 // check if the string is a number that's divisible by another.
80 isDivisibleBy(str: string, number: number): boolean;
81
82 // check if the string is an email.
83 isEmail(str: string, options?: IsEmailOptions): boolean;
84
85 // check if the string has a length of zero.
86 isEmpty(str: string): boolean;
87
88 // check if the string is a fully qualified domain name (e.g. domain.com).
89 isFQDN(str: string, options?: IsFQDNOptions): boolean;
90
91 // check if the string is a float.
92 isFloat(str: string, options?: IsFloatOptions): boolean;
93
94 // check if the string contains any full-width chars.
95 isFullWidth(str: string): boolean;
96
97 // check if the string contains any half-width chars.
98 isHalfWidth(str: string): boolean;
99
100 // check if the string is a hash of type algorithm.
101 // Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128',
102 // 'tiger160', 'tiger192', 'crc32', 'crc32b']
103 isHash(str: string, algorithm: HashAlgorithm): boolean;
104
105 // check if the string is a hexadecimal color.
106 isHexColor(str: string): boolean;
107
108 // check if the string is a hexadecimal number.
109 isHexadecimal(str: string): boolean;
110
111 // check if the string is an IP (version 4 or 6).
112 isIP(str: string, version?: number): boolean;
113
114 // check if the string is an ISBN (version 10 or 13).
115 isISBN(str: string, version?: number): boolean;
116
117 // check if the string is an ISSN (https://en.wikipedia.org/wiki/International_Standard_Serial_Number).
118 isISSN(str: string, options?: IsISSNOptions): boolean;
119
120 // check if the string is an ISIN (https://en.wikipedia.org/wiki/International_Securities_Identification_Number)
121 // (stock/security identifier).
122 isISIN(str: string): boolean;
123
124 // check if the string is a valid ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) date.
125 isISO8601(str: string, options?: IsISO8601Options): boolean;
126
127 // check if the string is a valid ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) officially assigned
128 // country code.
129 isISO31661Alpha2(str: string): boolean;
130
131 // check if the string is a ISRC (https://en.wikipedia.org/wiki/International_Standard_Recording_Code).
132 isISRC(str: string): boolean;
133
134 // check if the string is in a array of allowed values.
135 isIn(str: string, values: any[]): boolean;
136
137 // check if the string is an integer.
138 isInt(str: string, options?: IsIntOptions): boolean;
139
140 // check if the string is valid JSON (note: uses JSON.parse).
141 isJSON(str: string): boolean;
142
143 // check if the string is a valid latitude-longitude coordinate in the format lat,long or lat, long.
144 isLatLong(str: string): boolean;
145
146 // check if the string's length falls in a range.
147 // Note: this function takes into account surrogate pairs.
148 isLength(str: string, options: IsLengthOptions): boolean;
149 isLength(str: string, min: number, max?: number): boolean;
150
151 // check if the string is lowercase.
152 isLowercase(str: string): boolean;
153
154 // check if the string is a MAC address.
155 isMACAddress(str: string): boolean;
156
157 // check if the string is a MD5 hash.
158 isMD5(str: string): boolean;
159
160 // check if the string matches to a valid MIME type (https://en.wikipedia.org/wiki/Media_type) format
161 isMimeType(str: string): boolean;
162
163 // check if the string is a mobile phone number, (locale is one of
164 // ['ar-AE', ar-DZ', 'ar-EG', 'ar-JO', 'ar-SA', 'ar-SY', 'be-BY', 'bg-BG', 'cs-CZ', 'de-DE',
165 // 'da-DK', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-KE', 'en-NG', 'en-NZ', 'en-UG',
166 // 'en-RW', 'en-SG', 'en-TZ', 'en-PK', 'en-US', 'en-CA', 'en-ZA', 'en-ZM', 'es-ES', 'fa-IR',
167 // 'fi-FI', 'fo-FO', 'fr-FR', 'he-IL', 'hu-HU', 'id-ID', 'it-IT', 'ja-JP', 'kk-KZ', 'kl-GL',
168 // 'ko-KR', 'lt-LT', 'ms-MY', 'nb-NO', 'nn-NO', 'pl-PL', 'pt-PT', 'ro-RO', 'ru-RU', 'sk-SK',
169 // 'sr-RS', 'th-TH', 'tr-TR', 'uk-UA', 'vi-VN', 'zh-CN', 'zh-HK', 'zh-TW']).
170 isMobilePhone(str: string, locale: MobilePhoneLocale, options?: IsMobilePhoneOptions): boolean;
171
172 // check if the string is a valid hex-encoded representation of a MongoDB ObjectId
173 // (http://docs.mongodb.org/manual/reference/object-id/).
174 isMongoId(str: string): boolean;
175
176 // check if the string contains one or more multibyte chars.
177 isMultibyte(str: string): boolean;
178
179 // check if the string contains only numbers.
180 isNumeric(str: string, options?: IsNumericOptions): boolean;
181
182 // check if the string is a valid port number.
183 isPort(str: string): boolean;
184
185 // check if the string is a postal code, (locale is one of
186 // [ 'AT', 'AU', 'BE', 'BG', 'CA', 'CH', 'CZ', 'DE', 'DK', 'DZ', 'ES', 'FI', 'FR', 'GB', 'GR',
187 // 'IL', 'IN', 'IS', 'IT', 'JP', 'KE', 'LI', 'MX', 'NL', 'NO', 'PL', 'PT', 'RO', 'RU', 'SA',
188 // 'SE', 'TW', 'US', 'ZA', 'ZM' ]) OR 'any'. If 'any' is used, function will check if any of the
189 // locales match).
190 isPostalCode(str: string, locale: PostalCodeLocale): boolean;
191
192 // check if the string contains any surrogate pairs chars.
193 isSurrogatePair(str: string): boolean;
194
195 // check if the string is an URL.
196 isURL(str: string, options?: IsURLOptions): boolean;
197
198 // check if the string is a UUID. Must be one of ['3', '4', '5', 'all'], default is all.
199 isUUID(str: string, version?: 3|4|5|"3"|"4"|"5"|"all"): boolean;
200
201 // check if the string is uppercase.
202 isUppercase(str: string): boolean;
203
204 // check if the string contains a mixture of full and half-width chars.
205 isVariableWidth(str: string): boolean;
206
207 // checks characters if they appear in the whitelist.
208 isWhitelisted(str: string, chars: string | string[]): boolean;
209
210 // check if string matches the pattern.
211 matches(str: string, pattern: RegExp | string, modifiers?: string): boolean;
212
213 // **************
214 // * Sanitizers *
215 // **************
216
217 // remove characters that appear in the blacklist. The characters are used in a RegExp and so you will need
218 // to escape some chars, e.g. blacklist(input, '\\[\\]').
219 blacklist(input: string, chars: string): string;
220
221 // replace <, >, &, ', " and / with HTML entities.
222 escape(input: string): string;
223
224 // replaces HTML encoded entities with <, >, &, ', " and /.
225 unescape(input: string): string;
226
227 // trim characters from the left-side of the input.
228 ltrim(input: string, chars?: string): string;
229
230 // canonicalize an email address.
231 normalizeEmail(email: string, options?: NormalizeEmailOptions): string | false;
232
233 // trim characters from the right-side of the input.
234 rtrim(input: string, chars?: string): string;
235
236 // remove characters with a numerical value < 32 and 127, mostly control characters. If keep_new_lines is true,
237 // newline characters are preserved (\n and \r, hex 0xA and 0xD). Unicode-safe in JavaScript.
238 stripLow(input: string, keep_new_lines?: boolean): string;
239
240 // convert the input to a boolean. Everything except for '0', 'false' and '' returns true. In strict mode only '1'
241 // and 'true' return true.
242 toBoolean(input: string, strict?: boolean): boolean;
243
244 // convert the input to a date, or null if the input is not a date.
245 toDate(input: string): Date; // Date or null
246
247 // convert the input to a float, or NaN if the input is not a float.
248 toFloat(input: string): number; // number or NaN
249
250 // convert the input to an integer, or NaN if the input is not an integer.
251 toInt(input: string, radix?: number): number; // number or NaN
252
253 // trim characters (whitespace by default) from both sides of the input.
254 trim(input: string, chars?: string): string;
255
256 // remove characters that do not appear in the whitelist. The characters are used in a RegExp and so you will
257 // need to escape some chars, e.g. whitelist(input, '\\[\\]').
258 whitelist(input: string, chars: string): string;
259
260 toString(input: any | any[]): string;
261
262 version: string;
263
264 // **************
265 // * Extensions *
266 // **************
267
268 // add your own validators.
269 // Note: that the first argument will be automatically coerced to a string.
270 extend<T extends Function>(name: string, fn: T): void;
271 }
272
273 // options for IsByteLength
274 interface IsByteLengthOptions {
275 min?: number;
276 max?: number;
277 }
278
279 // options for IsCurrency
280 interface IsCurrencyOptions {
281 symbol?: string;
282 require_symbol?: boolean;
283 allow_space_after_symbol?: boolean;
284 symbol_after_digits?: boolean;
285 allow_negatives?: boolean;
286 parens_for_negatives?: boolean;
287 negative_sign_before_digits?: boolean;
288 negative_sign_after_digits?: boolean;
289 allow_negative_sign_placeholder?: boolean;
290 thousands_separator?: string;
291 decimal_separator?: string;
292 allow_decimal?: boolean;
293 require_decimal?: boolean;
294 digits_after_decimal?: number[];
295 allow_space_after_digits?: boolean;
296 }
297
298 // options for isDecimal
299 interface IsDecimalOptions {
300 force_decimal?: boolean;
301 decimal_digits?: string;
302 locale?: DecimalLocale;
303 }
304
305 // options for isEmail
306 interface IsEmailOptions {
307 allow_display_name?: boolean;
308 require_display_name?: boolean;
309 allow_utf8_local_part?: boolean;
310 require_tld?: boolean;
311 }
312
313 // options for isFQDN
314 interface IsFQDNOptions {
315 require_tld?: boolean;
316 allow_underscores?: boolean;
317 allow_trailing_dot?: boolean;
318 }
319
320 // options for IsFloat
321 interface IsFloatOptions {
322 min?: number;
323 max?: number;
324 gt?: number;
325 lt?: number;
326 locale?: FloatLocale;
327 }
328
329 // options for isISSN
330 interface IsISSNOptions {
331 case_sensitive?: boolean;
332 require_hyphen?: boolean;
333 }
334
335 // options for IsInt
336 interface IsIntOptions {
337 min?: number;
338 max?: number;
339 allow_leading_zeroes?: boolean;
340 lt?: number;
341 gt?: number;
342 }
343
344 // options for isISO8601
345 interface IsISO8601Options {
346 strict?: boolean;
347 }
348
349 // options for IsLength
350 interface IsLengthOptions {
351 min?: number;
352 max?: number;
353 }
354
355 // options for isMobilePhone
356 interface IsMobilePhoneOptions {
357 strictMode?: boolean;
358 }
359
360 // options for isURL
361 interface IsURLOptions {
362 protocols?: string[];
363 require_tld?: boolean;
364 require_protocol?: boolean;
365 require_host?: boolean;
366 require_valid_protocol?: boolean;
367 allow_underscores?: boolean;
368 host_whitelist?: (string | RegExp)[];
369 host_blacklist?: (string | RegExp)[];
370 allow_trailing_dot?: boolean;
371 allow_protocol_relative_urls?: boolean;
372 }
373
374 // options for normalizeEmail
375 interface NormalizeEmailOptions {
376 all_lowercase?: boolean;
377 gmail_lowercase?: boolean;
378 gmail_remove_dots?: boolean;
379 gmail_remove_subaddress?: boolean;
380 gmail_convert_googlemaildotcom?: boolean;
381 outlookdotcom_lowercase?: boolean;
382 outlookdotcom_remove_subaddress?: boolean;
383 yahoo_lowercase?: boolean;
384 yahoo_remove_subaddress?: boolean;
385 icloud_lowercase?: boolean;
386 icloud_remove_subaddress?: boolean;
387 }
388
389 /**
390 * Options for isNumeric
391 */
392 interface IsNumericOptions {
393 no_symbols?: boolean;
394 }
395}
396
397/**
398 * MODULES
399 */
400declare var validator: ValidatorJS.ValidatorStatic;
401
402declare module "validator" {
403 export = validator;
404}
405
406declare module "validator/lib/blacklist" {
407 const blacklist: typeof validator.blacklist;
408 export = blacklist;
409}
410
411declare module "validator/lib/contains" {
412 const contains: typeof validator.contains;
413 export = contains;
414}
415
416declare module "validator/lib/equals" {
417 const equals: typeof validator.equals;
418 export = equals;
419}
420
421declare module "validator/lib/escape" {
422 const escape: typeof validator.escape;
423 export = escape;
424}
425
426declare module "validator/lib/isAfter" {
427 const isAfter: typeof validator.isAfter;
428 export = isAfter;
429}
430
431declare module "validator/lib/isAlpha" {
432 const isAlpha: typeof validator.isAlpha;
433 export = isAlpha;
434}
435
436declare module "validator/lib/isAlphanumeric" {
437 const isAlphanumeric: typeof validator.isAlphanumeric;
438 export = isAlphanumeric;
439}
440
441declare module "validator/lib/isAscii" {
442 const isAscii: typeof validator.isAscii;
443 export = isAscii;
444}
445
446declare module "validator/lib/isBase64" {
447 const isBase64: typeof validator.isBase64;
448 export = isBase64;
449}
450
451declare module "validator/lib/isBefore" {
452 const isBefore: typeof validator.isBefore;
453 export = isBefore;
454}
455
456declare module "validator/lib/isBoolean" {
457 const isBoolean: typeof validator.isBoolean;
458 export = isBoolean;
459}
460
461declare module "validator/lib/isByteLength" {
462 const isByteLength: typeof validator.isByteLength;
463 export = isByteLength;
464}
465
466declare module "validator/lib/isCreditCard" {
467 const isCreditCard: typeof validator.isCreditCard;
468 export = isCreditCard;
469}
470
471declare module "validator/lib/isCurrency" {
472 const isCurrency: typeof validator.isCurrency;
473 export = isCurrency;
474}
475
476declare module "validator/lib/isDataURI" {
477 const isDataURI: typeof validator.isDataURI;
478 export = isDataURI;
479}
480
481declare module "validator/lib/isDecimal" {
482 const isDecimal: typeof validator.isDecimal;
483 export = isDecimal;
484}
485
486declare module "validator/lib/isDivisibleBy" {
487 const isDivisibleBy: typeof validator.isDivisibleBy;
488 export = isDivisibleBy;
489}
490
491declare module "validator/lib/isEmail" {
492 const isEmail: typeof validator.isEmail;
493 export = isEmail;
494}
495
496declare module "validator/lib/isEmpty" {
497 const isEmpty: typeof validator.isEmpty;
498 export = isEmpty;
499}
500
501declare module "validator/lib/isFQDN" {
502 const isFQDN: typeof validator.isFQDN;
503 export = isFQDN;
504}
505
506declare module "validator/lib/isFloat" {
507 const isFloat: typeof validator.isFloat;
508 export = isFloat;
509}
510
511declare module "validator/lib/isFullWidth" {
512 const isFullWidth: typeof validator.isFullWidth;
513 export = isFullWidth;
514}
515
516declare module "validator/lib/isHalfWidth" {
517 const isHalfWidth: typeof validator.isHalfWidth;
518 export = isHalfWidth;
519}
520
521declare module "validator/lib/isHash" {
522 const isHash: typeof validator.isHash;
523 export = isHash;
524}
525
526declare module "validator/lib/isHexColor" {
527 const isHexColor: typeof validator.isHexColor;
528 export = isHexColor;
529}
530
531declare module "validator/lib/isHexadecimal" {
532 const isHexadecimal: typeof validator.isHexadecimal;
533 export = isHexadecimal;
534}
535
536declare module "validator/lib/isIP" {
537 const isIP: typeof validator.isIP;
538 export = isIP;
539}
540
541declare module "validator/lib/isISBN" {
542 const isISBN: typeof validator.isISBN;
543 export = isISBN;
544}
545
546declare module "validator/lib/isISSN" {
547 const isISSN: typeof validator.isISSN;
548 export = isISSN;
549}
550
551declare module "validator/lib/isISIN" {
552 const isISIN: typeof validator.isISIN;
553 export = isISIN;
554}
555
556declare module "validator/lib/isISO8601" {
557 const isISO8601: typeof validator.isISO8601;
558 export = isISO8601;
559}
560
561declare module "validator/lib/isISO31661Alpha2" {
562 const isISO31661Alpha2: typeof validator.isISO31661Alpha2;
563 export = isISO31661Alpha2;
564}
565
566declare module "validator/lib/isISRC" {
567 const isISRC: typeof validator.isISRC;
568 export = isISRC;
569}
570
571declare module "validator/lib/isIn" {
572 const isIn: typeof validator.isIn;
573 export = isIn;
574}
575
576declare module "validator/lib/isInt" {
577 const isInt: typeof validator.isInt;
578 export = isInt;
579}
580
581declare module "validator/lib/isJSON" {
582 const isJSON: typeof validator.isJSON;
583 export = isJSON;
584}
585
586declare module "validator/lib/isLatLong" {
587 const isLatLong: typeof validator.isLatLong;
588 export = isLatLong;
589}
590
591declare module "validator/lib/isLength" {
592 const isLength: typeof validator.isLength;
593 export = isLength;
594}
595
596declare module "validator/lib/isLowercase" {
597 const isLowercase: typeof validator.isLowercase;
598 export = isLowercase;
599}
600
601declare module "validator/lib/isMACAddress" {
602 const isMACAddress: typeof validator.isMACAddress;
603 export = isMACAddress;
604}
605
606declare module "validator/lib/isMD5" {
607 const isMD5: typeof validator.isMD5;
608 export = isMD5;
609}
610
611declare module "validator/lib/isMimeType" {
612 const isMimeType: typeof validator.isMimeType;
613 export = isMimeType;
614}
615
616declare module "validator/lib/isMobilePhone" {
617 const isMobilePhone: typeof validator.isMobilePhone;
618 export = isMobilePhone;
619}
620
621declare module "validator/lib/isPostalCode" {
622 const isPostalCode: typeof validator.isPostalCode;
623 export = isPostalCode;
624}
625
626declare module "validator/lib/isMongoId" {
627 const isMongoId: typeof validator.isMongoId;
628 export = isMongoId;
629}
630
631declare module "validator/lib/isMultibyte" {
632 const isMultibyte: typeof validator.isMultibyte;
633 export = isMultibyte;
634}
635
636declare module "validator/lib/isNumeric" {
637 const isNumeric: typeof validator.isNumeric;
638 export = isNumeric;
639}
640
641declare module "validator/lib/isPort" {
642 const isPort: typeof validator.isPort;
643 export = isPort;
644}
645
646declare module "validator/lib/isSurrogatePair" {
647 const isSurrogatePair: typeof validator.isSurrogatePair;
648 export = isSurrogatePair;
649}
650
651declare module "validator/lib/isURL" {
652 const isURL: typeof validator.isURL;
653 export = isURL;
654}
655
656declare module "validator/lib/isUUID" {
657 const isUUID: typeof validator.isUUID;
658 export = isUUID;
659}
660
661declare module "validator/lib/isUppercase" {
662 const isUppercase: typeof validator.isUppercase;
663 export = isUppercase;
664}
665
666declare module "validator/lib/isVariableWidth" {
667 const isVariableWidth: typeof validator.isVariableWidth;
668 export = isVariableWidth;
669}
670
671declare module "validator/lib/isWhitelisted" {
672 const isWhitelisted: typeof validator.isWhitelisted;
673 export = isWhitelisted;
674}
675
676declare module "validator/lib/ltrim" {
677 const ltrim: typeof validator.ltrim;
678 export = ltrim;
679}
680
681declare module "validator/lib/matches" {
682 const matches: typeof validator.matches;
683 export = matches;
684}
685
686declare module "validator/lib/normalizeEmail" {
687 const normalizeEmail: typeof validator.normalizeEmail;
688 export = normalizeEmail;
689}
690
691declare module "validator/lib/rtrim" {
692 const rtrim: typeof validator.rtrim;
693 export = rtrim;
694}
695
696declare module "validator/lib/stripLow" {
697 const stripLow: typeof validator.stripLow;
698 export = stripLow;
699}
700
701declare module "validator/lib/toBoolean" {
702 const toBoolean: typeof validator.toBoolean;
703 export = toBoolean;
704}
705
706declare module "validator/lib/toDate" {
707 const toDate: typeof validator.toDate;
708 export = toDate;
709}
710
711declare module "validator/lib/toFloat" {
712 const toFloat: typeof validator.toFloat;
713 export = toFloat;
714}
715
716declare module "validator/lib/toInt" {
717 const toInt: typeof validator.toInt;
718 export = toInt;
719}
720
721declare module "validator/lib/trim" {
722 const trim: typeof validator.trim;
723 export = trim;
724}
725
726declare module "validator/lib/unescape" {
727 const unescape: typeof validator.unescape;
728 export = unescape;
729}
730
731declare module "validator/lib/whitelist" {
732 const whitelist: typeof validator.whitelist;
733 export = whitelist;
734}
735
736// deprecated interfaces for backward compatibility, please use ValidatorJS.* instead the ones
737interface IValidatorStatic extends ValidatorJS.ValidatorStatic { }
738interface IURLoptions extends ValidatorJS.IsURLOptions { }
739interface IFQDNoptions extends ValidatorJS.IsFQDNOptions { }
740interface IEmailoptions extends ValidatorJS.NormalizeEmailOptions { }