Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/valibot/src/schemas/nativeEnum/nativeEnum.ts>nativeEnum

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Go to Latest
function nativeEnum
import { nativeEnum } from "https://deno.land/x/valibot@v0.11.1/src/schemas/nativeEnum/nativeEnum.ts";

Creates a enum schema.

Type Parameters

TNativeEnum extends NativeEnum

Parameters

nativeEnum: TNativeEnum

The native enum value.

optional
error: string

The error message.