UX: delay error showing config #5920
Replies: 4 comments 11 replies
-
|
Beta Was this translation helpful? Give feedback.
-
This feature is released in 7.12.0 |
Beta Was this translation helpful? Give feedback.
-
This is a great feature (of an awesome library), however I wonder - why delay only error status update, why not debounce validation itself as well? That would greatly simplify things when one needs to trigger external API in validation code (for example - check if user already exists in signup form) without doing that on each keystroke. Also I'm aware of this solution, however in my opinion it is sub-optimal for two reasons:
And yet another solution doesn't seem to work with V7 library at all. |
Beta Was this translation helpful? Give feedback.
-
Context
One of the primary focuses of React Hook Form is to provide a better and consistent user experience when customers interact with our forms. For example, we introduce
mode
config, so as a developer you wouldn't need to manually handle error states while let hook form taking care of them consistently.Problem
The current
mode
is limited and has a strong connection with validation, while not giving the developer optimized behavior in terms of when and how much delay to show an error message.(According to some of the research which has been done in the previous feature request: )
Following are resources and research on the topic.
From UX Planet:
From designmodo:
From designer Andrew Burton:
From a Baymard Institute UX Research Article:
From a UX design series sponsored by Adobe:
This approach not only increases the number of unnecessary validation attempts, but it also frustrates users (because users will likely see error messages before they have completed the field). Ideally, inline validation messages should appear around 500 to 1000 milliseconds after the user has stopped typing or after they’ve moved to the next field.
Feature request
#1321
#5810
Proposal
name options
This is yet to be confirmed above.
This config will allow user error to be delayed by 500ms, and it's configurable at the form level. if you would like to overwrite such behavior, then you can use
trigger
to trigger instant validation results per field.What will this config do internally?
PR
Beta Was this translation helpful? Give feedback.
All reactions