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