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

x/valibot/src/actions/minLength/index.ts>minLength

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

Creates a min length validation action.

Type Parameters

TInput extends LengthInput
TRequirement extends number

Parameters

requirement: TRequirement

The minimum length.

Returns

A min length action.

Creates a min length validation action.

Type Parameters

TInput extends LengthInput
TRequirement extends number
TMessage extends ErrorMessage<MinLengthIssue<TInput, TRequirement>> | undefined

Parameters

requirement: TRequirement

The minimum length.

message: TMessage

The error message.