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

x/valibot/src/index.ts>tupleAsync

The modular and type safe schema library for validating structural data 🤖
Go to Latest
function tupleAsync
import { tupleAsync } from "https://deno.land/x/valibot@v1.0.0-beta.4/src/index.ts";

Creates a tuple schema.

Hint: This schema removes unknown items. The output will only include the items you specify. To include unknown items, use looseTupleAsync. To return an issue for unknown items, use strictTupleAsync. To include and validate unknown items, use tupleWithRestAsync.

Parameters

items: TItems

The items schema.

Returns

A tuple schema.

Creates a tuple schema.

Hint: This schema removes unknown items. The output will only include the items you specify. To include unknown items, use looseTupleAsync. To return an issue for unknown items, use strictTupleAsync. To include and validate unknown items, use tupleWithRestAsync.

Type Parameters

TItems extends TupleItemsAsync
TMessage extends ErrorMessage<TupleIssue> | undefined

Parameters

items: TItems

The items schema.

message: TMessage

The error message.