UNPKG

class-validator-extended

Version:
20 lines (19 loc) 619 B
import type { ValidationOptions } from 'class-validator'; /** @hidden */ export declare const SET_SIZE = "setSize"; /** * Checks if the given value is a [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) * with a size of exactly `size`. * * #### Example * ```typescript * // Ensure the set has exactly 5 entries. * @SetSize(5) * values: Set<string> * ``` * * @category Set * @param size The allowed size of the set. * @param options Generic class-validator options. */ export declare function SetSize(size: number, options?: ValidationOptions): PropertyDecorator;