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

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

    Parameters

    • size: number

      The allowed size of the map.

    • Optionaloptions: ValidationOptions

      Generic class-validator options.

    Returns PropertyDecorator