0

When the user comes to the profile edit page, I want to trigger the validation of the empty fields in the form and have them drawn in red. How can I do that?

I don't think I need to share any code blocks because I want to trigger formKey's validate method when the page is opened.

1 Answer 1

2

Use AutovalidateMode.always

TextFormField(
 autovalidateMode: AutovalidateMode.always,
   ....  
 )
Sign up to request clarification or add additional context in comments.

1 Comment

This will validate way more than on just the initial render

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.