Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/valibot/src/schemas/tuple/tuple.ts>tuple

The modular and type safe schema library for validating structural data 🤖
Go to Latest
function tuple
import { tuple } from "https://deno.land/x/valibot@v0.19.0/src/schemas/tuple/tuple.ts";

Creates a tuple schema.

Type Parameters

TTupleItems extends TupleShape

Parameters

The items schema.

optional
pipe: Pipe<TupleOutput<TTupleItems, undefined>>

A validation and transformation pipe.

Returns

TupleSchema<TTupleItems>

A tuple schema.

Creates a tuple schema.

Type Parameters

TTupleItems extends TupleShape

Parameters

The items schema.

optional
error: ErrorMessage

The error message.

optional
pipe: Pipe<TupleOutput<TTupleItems, undefined>>

A validation and transformation pipe.

Returns

TupleSchema<TTupleItems>

A tuple schema.

Creates a tuple schema.

Type Parameters

TTupleItems extends TupleShape
TTupleRest extends BaseSchema

Parameters

The items schema.

The rest schema.

optional
pipe: Pipe<TupleOutput<TTupleItems, TTupleRest>>

A validation and transformation pipe.

Returns

TupleSchema<TTupleItems, TTupleRest>

A tuple schema.

Creates a tuple schema.

Type Parameters

TTupleItems extends TupleShape
TTupleRest extends BaseSchema

Parameters

The items schema.

The rest schema.

optional
error: ErrorMessage

The error message.

optional
pipe: Pipe<TupleOutput<TTupleItems, TTupleRest>>

A validation and transformation pipe.

Returns

TupleSchema<TTupleItems, TTupleRest>

A tuple schema.