class-validator-extended - v4.2.0
    Preparing search index...

    Function MapSize

    • 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