Use case
For a custom Form, if we have a field showing an error after calling validate(), it could be required that modifying a different field changes the state of the Form, including the first invalid one.
If we use the auto validate mode, the field will be still invalid, but we may not want to show that to the user until they make a different action (like pressing a button).
This can be somewhat accomplished by calling FormState.reset() and then didChange(previousValue) but it seems more like a workaround than the right way of just clearing the error.
Proposal
To add a new method FormState.clearError() which would just set the _errorText.value to null, similar to the reset() method without modifying the field value.
Use case
For a custom Form, if we have a field showing an error after calling
validate(), it could be required that modifying a different field changes the state of the Form, including the first invalid one.If we use the auto validate mode, the field will be still invalid, but we may not want to show that to the user until they make a different action (like pressing a button).
This can be somewhat accomplished by calling
FormState.reset()and thendidChange(previousValue)but it seems more like a workaround than the right way of just clearing the error.Proposal
To add a new method
FormState.clearError()which would just set the_errorText.valuetonull, similar to thereset()method without modifying the field value.