-
-
Notifications
You must be signed in to change notification settings - Fork 556
Closed as not planned
Closed as not planned
Copy link
Labels
Staleawaiting author responseWaiting for author of issue to respond with more infoWaiting for author of issue to respond with more infoenhancementNew feature or requestNew feature or request
Description
Is there an existing issue for this?
- I have searched the existing issues
Package/Plugin version
9.1.1
What you'd like to happen
Currently, AutovalidateMode.onUserInteraction is immediate. It'd be great if we could delay it by debouncing, so that when the user stops typing for some amount of seconds, that's when the field is validated.
And specifically, it'd be great to be able to debounce validation per field, instead of validating the whole form at once.
Alternatives you've considered
This discussion is the big inspiration for this feature request: https://stackoverflow.com/questions/71441597/how-to-achieve-the-best-ux-with-flutter-form-autovalidatemode
You can see that the Lalit's answer provides an implementation for debouncing. This works great if you're content to validate the entire form at once, but for my purposes I'd like to validate just the field that is being interacted with. There is already the per field AutovalidateMode.onUserInteraction that almost achieves what I want.
Aditional information
Many options for implementation come to mind. Here's one:
Implement a new autoValidateMode: `debounced`/`onUserInteractionDelayed`, with some fixed debounce timing (e.g 2 seconds). An additional property to override the Duration would be nice to have, too.
Metadata
Metadata
Assignees
Labels
Staleawaiting author responseWaiting for author of issue to respond with more infoWaiting for author of issue to respond with more infoenhancementNew feature or requestNew feature or request
Type
Projects
Status
Done