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

x/valibot/src/schemas/object/index.ts>object

The modular and type safe schema library for validating structural data 🤖
Go to Latest
function object
import { object } from "https://deno.land/x/valibot@v0.1.0-to-json-schema/src/schemas/object/index.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 looseObject. To return an issue for unknown entries, use strictObject. To include and validate unknown entries, use objectWithRest.

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 looseObject. To return an issue for unknown entries, use strictObject. To include and validate unknown entries, use objectWithRest.

Type Parameters

TEntries extends ObjectEntries
TMessage extends ErrorMessage<ObjectIssue> | undefined

Parameters

entries: TEntries

The entries schema.

message: TMessage

The error message.