clearError method
Clears any visible validation error for this field without resetting the field's value.
This sets errorText to null and hasInteractedByUser to false.
If AutovalidateMode.always is used, the error may reappear immediately because the field will trigger a new validation cycle during the next build. See also:
- FormState.clearError, which clears errors across all fields in the form.
Implementation
void clearError() {
setState(() {
_clearErrorInternal();
});
Form.maybeOf(context)?._fieldDidChange();
}