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

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

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

Creates a literal schema.

Type Parameters

TLiteral extends string | number

Parameters

literal: TLiteral

The literal value.

optional
error: string

The error message.

Returns

A literal schema.