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

x/valibot/src/methods/index.ts

The modular and type safe schema library for validating structural data 🤖
Go to Latest
import * as valibot from "https://deno.land/x/valibot@v0.8.0/src/methods/index.ts";

Functions

Coerces the input of a schema to match the required type.

Coerces the input of a async schema to match the required type.

Checks if the input matches the scheme. By using a type predicate, this function can be used as a type guard.

Creates a enum schema of object keys.

Merges multiple object schemas into a single one. Subsequent object schemas overwrite the previous ones.

Merges multiple async object schemas into a single one. Subsequent object schemas overwrite the previous ones.

Creates an object schema that contains not the selected keys of an existing schema.

Creates an async object schema that contains only the selected keys of an existing schema.

Parses unknown input based on a schema.

Parses unknown input based on a schema.

Creates an object schema consisting of all properties of an existing object schema set to optional.

Creates an async object schema consisting of all properties of an existing object schema set to optional.

Creates an object schema that contains only the selected keys of an existing schema.

Creates an async object schema that contains only the selected keys of an existing schema.

Creates an object schema consisting of all properties of an existing object schema set to none optional.

Creates an async object schema consisting of all properties of an existing object schema set to none optional.

Parses unknown input based on a schema.

Parses unknown input based on a schema.

Creates a strict object schema that throws an error if an input contains unknown keys.

Creates a strict async object schema that throws an error if an input contains unknown keys.

Unwraps the wrapped schema.

Passes the default value to a schema in case of an undefined input.