validateForm method
Implementations of this method should call FormX.validateForm
When softValidation
is true, it doesn't add errors messages to the
fields, but updates the value of FormXState.isFormValid which can be
used to show a submit button as enabled or disabled.
Implementation
@override
Future<bool> validateForm({bool softValidation = false}) async {
final formX = await FormX.fromState(state)
.validateForm(softValidation: softValidation);
emit(formX.state);
return state.isFormValid;
}