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@v1.0.0-beta.1/src/methods/index.ts";

Functions

Checks if the input matches the schema. As this is an assertion function, it can be used as a type guard.

Changes the local configuration of a schema.

Returns a fallback value as output if the input does not match the schema.

Returns a fallback value as output if the input does not match the schema.

Flatten the error messages of issues.

Forwards the issues of the passed validation action.

Forwards the issues of the passed validation action.

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 values of the schema.

Returns the fallback values of the schema.

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

Creates a picklist schema of object keys.

Creates a modified copy of an object schema that does not contain the selected entries.

Parses an unknown input based on a schema.

Parses an unknown input based on a schema.

Returns a function that parses an unknown input based on a schema.

Returns a function that parses an unknown input based on a schema.

Creates a modified copy of an object schema that marks all entries as optional.

Creates a modified copy of an object schema that marks all entries as optional.

Creates a modified copy of an object schema that contains only the selected entries.

Adds a pipeline to a schema, that can validate and transform its input.

Adds a pipeline to a schema, that can validate and transform its input.

Creates a modified copy of an object schema that marks all entries as required.

Creates a modified copy of an object schema that marks all entries as required.

Parses an unknown input based on a schema.

Parses an unknown input based on a schema.

Returns a function that parses an unknown input based on a schema.

Returns a function that parses an unknown input based on a schema.

Unwraps the wrapped schema.

Interfaces

The parser type.

The parser async type.

The safe parser type.

The safe parser async type.

Type Aliases

Fallback type.

Fallback async type.

Flat errors type.

Infer default type.

Infer defaults type.

Infer fallback type.

Infer fallbacks type.

Safe parse result type.

Schema with fallback type.

Schema with fallback async type.

Schema with omit type.

Schema with partial type.

Schema with partial type.

Schema with pick type.

Schema with pipe type.

Schema with pipe async type.

Schema with required type.

Schema with required type.