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

    Function ArraySize

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

      // Ensure the array has exactly 5 entries.
      @ArraySize(5)
      values: string[]

      Parameters

      • size: number

        The allowed size of the array.

      • Optionaloptions: ValidationOptions

        Generic class-validator options.

      Returns PropertyDecorator