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