UNPKG

650 BTypeScriptView Raw
1import { ValidationOptions } from '../ValidationOptions';
2export declare const IS_LENGTH = "isLength";
3/**
4 * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs.
5 * If given value is not a string, then it returns false.
6 */
7export declare function length(value: unknown, min: number, max?: number): boolean;
8/**
9 * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs.
10 * If given value is not a string, then it returns false.
11 */
12export declare function Length(min: number, max?: number, validationOptions?: ValidationOptions): PropertyDecorator;