@codethread/tstl-validate
Version:
Fork and adaptation of valibot for use in typescript-to-lua
12 lines (11 loc) • 443 B
TypeScript
/** @noSelfInFile */
import type { ParseResult, ValidateInfo } from "../../types";
/**
* Creates a validation functions that validates the length of a string or array.
*
* @param requirement The length.
* @param error The error message.
*
* @returns A validation function.
*/
export declare function length<TInput extends string | any[]>(requirement: number, error?: string): (input: TInput, info: ValidateInfo) => ParseResult<TInput>;