set()
set<
ItemSchema>(itemSchema,message?):SetConstraint<ItemSchema>
Set schema - validates a Set with typed elements.
Type Parametersβ
ItemSchema: ItemSchema extends GenericSchemaβ
Parametersβ
itemSchema: ItemSchemaβ
Schema to validate each item.
message?: stringβ
Custom error message.
Returns: SetConstraint<ItemSchema>β
Schema that validates a Set with typed items and constraints.
Sinceβ
2.0.0