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

x/valibot/mod.ts>tuple

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

Creates a tuple schema.

Type Parameters

TItems extends TupleItems

Parameters

items: TItems

The items schema.

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

A validation and transformation pipe.

Returns

TupleSchema<TItems>

A tuple schema.

Creates a tuple schema.

Type Parameters

TItems extends TupleItems

Parameters

items: TItems

The items schema.

optional
message: ErrorMessage

The error message.

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

A validation and transformation pipe.

Returns

TupleSchema<TItems>

A tuple schema.

Creates a tuple schema.

Type Parameters

TItems extends TupleItems
TRest extends BaseSchema | undefined

Parameters

items: TItems

The items schema.

rest: TRest

The rest schema.

optional
pipe: Pipe<TupleOutput<TItems, TRest>>

A validation and transformation pipe.

Returns

TupleSchema<TItems, TRest>

A tuple schema.

Creates a tuple schema.

Type Parameters

TItems extends TupleItems
TRest extends BaseSchema | undefined

Parameters

items: TItems

The items schema.

rest: TRest

The rest schema.

optional
message: ErrorMessage

The error message.

optional
pipe: Pipe<TupleOutput<TItems, TRest>>

A validation and transformation pipe.

Returns

TupleSchema<TItems, TRest>

A tuple schema.