UNPKG

class-validator

Version:

Decorator-based property validation for classes.

11 lines (10 loc) 417 B
import { ValidationOptions } from '../ValidationOptions'; export declare const IS_ENUM = "isEnum"; /** * Checks if a given value is the member of the provided enum. */ export declare function isEnum(value: unknown, entity: any): boolean; /** * Checks if a given value is the member of the provided enum. */ export declare function IsEnum(entity: object, validationOptions?: ValidationOptions): PropertyDecorator;