@decaf-ts/decorator-validation
Version:
simple decorator based validation engine
30 lines (29 loc) • 836 B
TypeScript
import { Validator } from "./Validator";
import { MaxLengthValidatorOptions } from "../types";
/**
* @summary Maximum Length Validator
* @description Validates strings and Arrays on their maximum length
*
* @param {string} [message] defaults to {@link DEFAULT_ERROR_MESSAGES#MAX_LENGTH}
*
* @class MinLengthValidator
* @extends Validator
*
* @category Validators
*/
export declare class MaxLengthValidator extends Validator<MaxLengthValidatorOptions> {
constructor(message?: string);
/**
* @summary Validates a model
*
* @param {string} value
* @param {MaxLengthValidatorOptions} options
*
* @return {string | undefined}
*
* @override
*
* @see Validator#hasErrors
*/
hasErrors(value: string | any[], options: MaxLengthValidatorOptions): string | undefined;
}