UNPKG

670 BTypeScriptView Raw
1import { ValidationOptions } from '../ValidationOptions';
2import * as ValidatorJS from 'validator';
3export declare const IS_POSTAL_CODE = "isPostalCode";
4/**
5 * Check if the string is a postal code, in the specified locale.
6 * If given value is not a string, then it returns false.
7 */
8export declare function isPostalCode(value: unknown, locale: 'any' | ValidatorJS.PostalCodeLocale): boolean;
9/**
10 * Check if the string is a postal code, in the specified locale.
11 * If given value is not a string, then it returns false.
12 */
13export declare function IsPostalCode(locale?: 'any' | ValidatorJS.PostalCodeLocale, validationOptions?: ValidationOptions): PropertyDecorator;