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

    Function MapMaxSize

    • Checks if the given value is a Map with a size less than or equal to maximum.

      // Ensure the map has at most 5 entries.
      @MapMaxSize(5)
      values: Map<string, string>

      Parameters

      • maximum: number

        The maximum allowed size of the map.

      • Optionaloptions: ValidationOptions

        Generic class-validator options.

      Returns PropertyDecorator