class-validator
Version:
Decorator-based property validation for classes.
13 lines (12 loc) • 595 B
TypeScript
import { ValidationOptions } from '../ValidationOptions';
export declare const ARRAY_MAX_SIZE = "arrayMaxSize";
/**
* Checks if the array's length is less or equal to the specified number.
* If null or undefined is given then this function returns false.
*/
export declare function arrayMaxSize(array: unknown, max: number): boolean;
/**
* Checks if the array's length is less or equal to the specified number.
* If null or undefined is given then this function returns false.
*/
export declare function ArrayMaxSize(max: number, validationOptions?: ValidationOptions): PropertyDecorator;