Interface ValidationResult

interface ValidationResult {
    error: null | string;
    isSubmitted: boolean;
    isTouched: boolean;
    isValid: boolean;
}

Properties

error: null | string

Validation error message.

null if no validation error is present.

isSubmitted: boolean

true if the field has been submitted (or attempted to be submitted)

isTouched: boolean

true if the field has been touched, i.e. the user has interacted with it.

isValid: boolean

true if the element is valid and have no validation errors.