UNPKG

class-validator-extended

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