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 🤖
Go to Latest
function literal
import { literal } from "https://deno.land/x/valibot@v0.8.0/src/schemas/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.