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

x/valibot/mod.ts>maxWords

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Latest
function maxWords
import { maxWords } from "https://deno.land/x/valibot@v1.0.0-beta.2-to-json-schema/mod.ts";

Creates a max words validation action.

Type Parameters

TInput extends string
TLocales extends Intl.LocalesArgument
TRequirement extends number

Parameters

locales: TLocales

The locales to be used.

requirement: TRequirement

The maximum words.

Returns

A max words action.

Creates a max words validation action.

Type Parameters

TInput extends string
TLocales extends Intl.LocalesArgument
TRequirement extends number
TMessage extends ErrorMessage<MaxWordsIssue<TInput, TRequirement>> | undefined

Parameters

locales: TLocales

The locales to be used.

requirement: TRequirement

The maximum words.

message: TMessage

The error message.