• Checks if the given value is a Map with a size of exactly size.

    Example

    // Ensure the map has exactly 5 entries.
    @MapSize(5)
    values: Map<string, string>

    Parameters

    • size: number

      The allowed size of the map.

    • Optional options: ValidationOptions

      Generic class-validator options.

    Returns PropertyDecorator