Skip to content

[T] MaxContainsDecorator

type MaxContainsDecorator = (context, target, value) => void;

Used in conjunction with the @contains decorator, specifies that the array must contain at most a certain number of the types provided by the @contains decorator.

Parameters

ParameterTypeDescription
contextDecoratorContext-
targetType | ModelProperty-
valuenumberThe maximum number of instances the array must contain

Returns

void