validator property

FormFieldValidator<T> validator
final

An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise.

The returned value is exposed by the FormFieldState.errorText property. The TextFormField uses this to override the InputDecoration.errorText value.

Implementation

final FormFieldValidator<T> validator