Skip to main content

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