validators property

List<InputValidator> validators

Methods that validate an input. The first failed validation will return an error string and no more validations will happen.

The returned value is exposed by the InputFieldState.errorText property which will be used by the default decoration.

Alternating between error and normal state can cause the height of the field to change if no other subtext decoration is set on the field. To create a field whose height is fixed regardless of whether or not an error is displayed, either wrap the field in a fixed height parent like SizedBox, or set the helperText parameter to a space.


final List<InputValidator> validators;