Skip to main content

tuple()

tuple<T>(schemas, message?): TupleSchema<T>

Tuple schema - validates an array with specific types at each position.


Type Parametersโ€‹

T: T extends readonly GenericSchema[]โ€‹


Parametersโ€‹

schemas: Tโ€‹

Array of schemas for each tuple position.

message?: stringโ€‹

Custom error message.


Returns: TupleSchema<T>โ€‹

Schema that validates a tuple with the specified types.


Sinceโ€‹

2.0.0