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

x/valibot/src/schemas/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.28.1/src/schemas/index.ts";

Creates a literal schema.

Type Parameters

TLiteral extends Literal

Parameters

literal_: TLiteral

The literal value.

optional
message: ErrorMessage

The error message.

Returns

A literal schema.