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

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

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

Creates a picklist schema.

Type Parameters

TOption extends string
TOptions extends PicklistOptions<TOption>

Parameters

options: TOptions

The picklist value.

optional
message: ErrorMessage = [UNSUPPORTED]

The error message.

Returns

A picklist schema.