You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example formz/example/lib/main.dart, which is also the example on pub.dev/formz, does not seem to behave as expected: If I leave the fields for Email and Password empty, the input in _onSubmit should be rejected, since empty fields do not pass the validator of either Email or Password. However, at program startup or after each _resetForm call, empty text fields are not rejected.
One could solve the problem by changing all default values of the MyFormState constructor from pure to dirty:
The example formz/example/lib/main.dart, which is also the example on pub.dev/formz, does not seem to behave as expected: If I leave the fields for Email and Password empty, the input in
_onSubmit
should be rejected, since empty fields do not pass thevalidator
of eitherEmail
orPassword
. However, at program startup or after each_resetForm
call, empty text fields are not rejected.One could solve the problem by changing all default values of the
MyFormState
constructor frompure
todirty
:But I am not sure if this is the right approach. Could you please check this?
The text was updated successfully, but these errors were encountered: