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

    Function SetMaxSize

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

      // Ensure the set has at most 5 entries.
      @SetMaxSize(5)
      values: Set<string>

      Parameters

      • maximum: number

        The maximum allowed size of the set.

      • Optionaloptions: ValidationOptions

        Generic class-validator options.

      Returns PropertyDecorator