UNPKG

605 BTypeScriptView Raw
1import { ValidationOptions } from '../ValidationOptions';
2export declare type UUIDVersion = '3' | '4' | '5' | 'all' | 3 | 4 | 5;
3export declare const IS_UUID = "isUuid";
4/**
5 * Checks if the string is a UUID (version 3, 4 or 5).
6 * If given value is not a string, then it returns false.
7 */
8export declare function isUUID(value: unknown, version?: UUIDVersion): boolean;
9/**
10 * Checks if the string is a UUID (version 3, 4 or 5).
11 * If given value is not a string, then it returns false.
12 */
13export declare function IsUUID(version?: UUIDVersion, validationOptions?: ValidationOptions): PropertyDecorator;