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.24.0/src/methods/index.ts";

Variables

Brand symbol.

v
useDefault
deprecated

Functions

Brands the output type of a schema.

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

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

Returns a fallback value when validating the passed schema failed.

Returns a fallback value when validating the passed schema failed.

Forwards the issues of the passed validation.

Returns the default value of the schema.

Returns the default value of the schema.

Returns the default values of the schema.

Returns the default values of the schema.

Returns the fallback value of the schema.

Returns the fallback value of the schema.

Returns the fallback values of the schema.

Returns the fallback values of the schema.

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 the entries of multiple object schemas. Subsequent object entries overwrite the previous ones.

Merges the entries of multiple async object schemas. Subsequent object entries 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.

f
passthrough
deprecated

Creates an object schema that passes unknown keys.

f
passthroughAsync
deprecated

Creates an object schema that passes unknown keys.

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.

f
strict
deprecated

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

f
strictAsync
deprecated

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

f
strip
deprecated

Creates an object schema that strips unknown keys.

f
stripAsync
deprecated

Creates an object schema that strips unknown keys.

Adds a transformation step to a schema, which is executed at the end of parsing and can change the output type.

Adds an async transformation step to a schema, which is executed at the end of parsing and can change the output type.

Unwraps the wrapped schema.

f
withDefault
deprecated

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

Type Aliases

Brand type.

Brand name type.

Default value type.

Default values type.

Fallback info type.

Fallback value type.

Fallback values type.

Partial object entries type.

Partial object entries async type.

Safe parse result type.

Schema with brand type.

Schema with fallback type.

Schema with fallback async type.

Schema with maybe default type.

Schema with maybe default async type.

Schema with maybe fallback type.

Schema with maybe fallback async type.

Schema with transform type.

Schema with transform async type.