Skip to content

Function.exactLength

github-actions[bot] edited this page Jun 2, 2026 · 21 revisions

umt / exactLength

Function: exactLength()

exactLength(length, message?): ValidateReturnType<string>

Defined in: Validate/string/exactLength.ts:14

Creates a validator for checking if a string has an exact length

Parameters

length

number

The exact length that the string should have

message?

string

Custom error message for validation failure

Returns

ValidateReturnType<string>

  • Validator for string length

API

Classes

Interfaces

Type Aliases

Variables

Functions

Clone this wiki locally