-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
issue: FormState IsValid is causing issues with shouldUseNativeValidation #10064
Comments
If there's a better way to check if it's valid before I make the call that will work. I'm also figuring out that once it's been submitted is when the error also happens. |
Actually I don't really want to change the ticket as it was originally setup this way, but one way I figured around this possibly is I've tried to put in custom messages. So I was doing |
This is still not fixed. I added on to it, maybe it should've been a different issue, but here's the code again with some modifications: https://codesandbox.io/s/cranky-dewdney-jlzt4b?file=/src/App.tsx On the origin you can see I have messages on the validation rules and on the destination there are no messages. After you fill out the form and hit submit. It submits properly. Then when you try and change the origin zip code again it fails. It works if I ask for the specific type of validation rule. The reason we are doing this is that we are creating a pricing tool. So someone picks a destination zip code and an origin zip code. They fill out other data and hit submit. Well sometimes they will want to change the zip codes without change the other information. So right now it's not triggering that the zip code is valid. |
Version Number
7.43.5
Codesandbox/Expo snack
https://codesandbox.io/s/cranky-dewdney-jlzt4b?file=/src/App.tsx
Steps to reproduce
isValid
Expected behaviour
I'm expecting that if I'm using
isValid
that it should work without usingisValid
What browsers are you seeing the problem on?
Chrome, Edge
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: