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

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

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Go to Latest
interface UnionSchema
implements BaseSchema<Input<TOptions[number]>, TOutput>
import { type UnionSchema } from "https://deno.land/x/valibot@v0.30.0/src/schemas/union/index.ts";

Union schema type.

Type Parameters

TOptions extends UnionOptions
optional
TOutput = Output<TOptions[number]>

Properties

type: "union"

The schema type.

options: TOptions

The union options.

message: ErrorMessage | undefined

The error message.

pipe: Pipe<Output<TOptions[number]>> | undefined

The validation and transformation pipeline.