Перейти до основного вмісту

Variable: IsMaxLengthValidatorDefinition

validation/src.IsMaxLengthValidatorDefinition

const IsMaxLengthValidatorDefinition: object

Type declaration​

decorator​

decorator: (n, validationOptions?) => PropertyDecorator = MaxLengthLocalized

Parameters​

▪ n: number

▪ validationOptions?: ValidationOptions

Returns​

PropertyDecorator

defaultValidationMessage​

defaultValidationMessage: string

name​

name: string = MAX_LENGTH

validator​

validator: (value, max) => boolean = maxLength

Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs. If given value is not a string, then it returns false.

Parameters​

▪ value: unknown

▪ max: number

Returns​

boolean

Source​

libs/validation/src/lib/validators/primitives/is-max-length.validator.ts:21


Generated using typedoc-plugin-markdown and TypeDoc