import { object } from "https://deno.land/x/valibot@v1.0.0-beta.7/src/schemas/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
.
Type Parameters
TEntries extends ObjectEntries
Parameters
entries: TEntries
The entries schema.
Returns
ObjectSchema<TEntries, undefined>
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
Returns
An object schema.