Replies: 2 comments 1 reply
-
Hi!
Example:
I hope that this solved your question. Anyway, I have created the task #1490 to have an example with this use case, since it is very common |
Beta Was this translation helpful? Give feedback.
0 replies
-
Appreciate the answer, thanks! Couple of follow ups:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When creating a submit button for a form, I would like to disable the button if the form is invalid. I check if
formKey.currentState?.saveAndValidate() ?? false
is true or not, and if not, I return null for the button callback. However, this runs on the first build, and I believe causes all of the error messages to appear for example on empty required fields. I would like for the error messages not to appear, and instead use the auto-validate mode of the form/fields. Is there a way to check the form validation without causing the error messages to render? Or is there another way to disable the button on an invalid form?Beta Was this translation helpful? Give feedback.
All reactions