-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<Field /> & <FastField /> should have validateOnChange & validateOnBlur settings #1044
Comments
What is the best way of doing this with the current api? |
Yes, I could really do with this, too. For instance: on a normal text input you likely want validation |
Bump for this, would be nice to validate password/confirm password to be the same |
Another bump for this. Has there been any progress regarding this enhancement? |
Hello, yes adding another bump here. My use case: On account registration, we have following basic fields:
We'd like to validate the form on submit for fields 1 - 3 & 5. |
Would find this feature very useful as well. Use case being similar to others. For text-like inputs validation onBlur is often a better UX than onChange, as changing errors states mid-typing can be jarring. While onBlur in those cases show the user-intention to be done, making validation at that point timely. For checkboxes and radios, we want validation onChange, as we know the user interaction is already complete, while onBlur may not take place in a timely manor, leaving a user without feedback. |
🐛 Feature request
Current Behavior
<FastField />
&<Field />
don't havevalidateOnChange
&validateOnBlur
settings.Expected behavior
Setting
validateOnChange
&validateOnBlur
on<Field />
or<FastField />
should override global form settings.Reproducible example
https://codesandbox.io/s/3q55883491
Suggested solution(s)
Make props
validateOnChange
&validateOnBlur
available for<Field />
&<FastField />
.Additional context
This may or may not be a bug. I'm using Typescript and I don't get an error message when I set
validateOnBlur
orvalidateOnChange
on<FastField />
. Does this mean these props already exist, but don't work?Your environment
The text was updated successfully, but these errors were encountered: