Interface representing validation options for a form field.

interface IValidation {
    date?: boolean;
    maxLength?: number;
    maxNum?: number;
    minLength?: number;
    minNum?: number;
    numeric?: boolean;
    pattern?: RegExp;
    required?: boolean;
    time?: boolean;
}

Properties

date?: boolean
maxLength?: number

Maximum length allowed for the field value.

maxNum?: number
minLength?: number

Minimum length required for the field value.

minNum?: number
numeric?: boolean
pattern?: RegExp

Regular expression pattern for validating the field value.

required?: boolean

Indicates if the field is required or not.

time?: boolean