UNPKG

class-validator-extended

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