UNPKG

fluent-ts-validator

Version:
17 lines (16 loc) 486 B
import { PropertyValidator } from "../PropertyValidator"; /** * Validates if given value is in a collection of allowed values or in an object/enum. * * @export * @class IsInValidator * @implements {PropertyValidator<T>} * @template T */ export declare class IsInValidator<T> implements PropertyValidator<T> { private obj; constructor(obj: Iterable<T> | any); isValid(input: any): boolean; private isElementOfIterable(input); private isValueInObject(input); }