class-validator
Version:
Decorator-based property validation for classes.
21 lines (20 loc) • 1.02 kB
TypeScript
import { ValidationOptions } from '../ValidationOptions';
export declare const IS_TAX_ID = "isTaxId";
/**
* Checks if the string is a valid tax ID. Default locale is `en-US`.
* If given value is not a string, then it returns false.
*
* Supported locales: bg-BG, cs-CZ, de-AT, de-DE, dk-DK, el-CY, el-GR, en-CA,
* en-IE, en-US, es-ES, et-EE, fi-FI, fr-BE, fr-FR, fr-LU, hr-HR, hu-HU, it-IT,
* lv-LV, mt-MT, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, sk-SK, sl-SI, sv-SE.
*/
export declare function isTaxId(value: unknown, locale?: string): boolean;
/**
* Checks if the string is a valid tax ID. Default locale is `en-US`.
* If given value is not a string, then it returns false.
*
* Supported locales: bg-BG, cs-CZ, de-AT, de-DE, dk-DK, el-CY, el-GR, en-CA,
* en-IE, en-US, es-ES, et-EE, fi-FI, fr-BE, fr-FR, fr-LU, hr-HR, hu-HU, it-IT,
* lv-LV, mt-MT, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, sk-SK, sl-SI, sv-SE.
*/
export declare function IsTaxId(locale?: string, validationOptions?: ValidationOptions): PropertyDecorator;