Skip to main content
Module

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

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

Creates an union schema.

Parameters

options: TOptions

The union options.

Returns

UnionSchema<TOptions, undefined>

An union schema.

Creates an union schema.

Type Parameters

TOptions extends UnionOptions
TMessage extends ErrorMessage<UnionIssue<InferIssue<TOptions[number]>>> | undefined

Parameters

options: TOptions

The union options.

message: TMessage

The error message.