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

x/valibot/mod.ts>EnumSchema

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Latest
interface EnumSchema
implements BaseSchema<TEnum[keyof TEnum], TEnum[keyof TEnum], EnumIssue>
import { type EnumSchema } from "https://deno.land/x/valibot@v0.35.0/mod.ts";

Enum schema type.

Type Parameters

TEnum extends Enum
TMessage extends ErrorMessage<EnumIssue> | undefined

Properties

readonly
type: "enum"

The schema type.

readonly
reference: enum_

The schema reference.

readonly
enum: TEnum

The enum object.

readonly
options: TEnum[keyof TEnum][]

The enum options.

readonly
message: TMessage

The error message.