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

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

The modular and type safe schema library for validating structural data 🤖
Latest
function instance
import { instance } from "https://deno.land/x/valibot@v1.0.0-beta.1-i18n/src/schemas/instance/index.ts";

Creates an instance schema.

Type Parameters

TClass extends Class

Parameters

class_: TClass

The class of the instance.

Returns

An instance schema.

Creates an instance schema.

Type Parameters

TClass extends Class
TMessage extends ErrorMessage<InstanceIssue> | undefined

Parameters

class_: TClass

The class of the instance.

message: TMessage

The error message.

Returns

An instance schema.