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

    Example

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

    Parameters

    • size: number

      The allowed size of the array.

    • Optional options: ValidationOptions

      Generic class-validator options.

    Returns PropertyDecorator

Generated using TypeDoc