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

    Function SetSize

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

      // Ensure the set has exactly 5 entries.
      @SetSize(5)
      values: Set<string>

      Parameters

      • size: number

        The allowed size of the set.

      • Optionaloptions: ValidationOptions

        Generic class-validator options.

      Returns PropertyDecorator