Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/valibot/mod.ts>objectAsync

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Latest
function objectAsync
import { objectAsync } from "https://deno.land/x/valibot@v0.35.0/mod.ts";

Creates an object schema.

Hint: This schema removes unknown entries. The output will only include the entries you specify. To include unknown entries, use looseObjectAsync. To return an issue for unknown entries, use strictObjectAsync. To include and validate unknown entries, use objectWithRestAsync.

Parameters

entries: TEntries

The entries schema.

Returns

An object schema.

Creates an object schema.

Hint: This schema removes unknown entries. The output will only include the entries you specify. To include unknown entries, use looseObjectAsync. To return an issue for unknown entries, use strictObjectAsync. To include and validate unknown entries, use objectWithRestAsync.

Type Parameters

TEntries extends ObjectEntriesAsync
TMessage extends ErrorMessage<ObjectIssue> | undefined

Parameters

entries: TEntries

The entries schema.

message: TMessage

The error message.