Skip to content

[T] ContainsDecorator

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

Specify that the array must contain at least one instance of the provided type. Use @minContains and @maxContains to customize how many instances to expect.

Parameters

ParameterTypeDescription
contextDecoratorContext-
targetType | ModelProperty-
valueTypeThe type the array must contain.

Returns

void