Aller au contenu principal

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