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
yupResolver raise Types of parameters 'options' and 'options' are incompatible at react-hook-form 7.15.0 #234
Comments
I have the same exact issue but with joiResolver. Suddenly after updating to the latest versions I got that type error. Any updates regarding that issue? |
🎉 This issue has been resolved in version 2.8.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@jorisre Thank you for fixing, but unfortunately still raise type error in my app.... https://codesandbox.io/s/hardcore-darwin-qusu6?file=/src/App.tsx I Updated to @asalahjawava |
Thank you @heavenshell for reporting the issue. I'll open a PR. |
@heavenshell You can remove |
Can you share a codesanbox please ? Edit: you've a typescript with default values not resolver. |
it is because i use yup.object().shape() instead of yup.object() |
Using |
Hi, "@hookform/resolvers": "^2.8.1", They are the latest versions that are atm available and how I solved the above error is by using the yupResolver with the next generic type yupResolver<yup.AnyObjectSchema>. An example could be the following:
You can also add the defaultValues and I would recommend you to do that. Hope it helps you :) |
hello there. I ran into the same type error with
|
Hi, I'm assuming you have enough to go on right now but also wanted to report this also seems to be an issue with Zod. Thank you for all your work on this project!
Versions are... Downgrading both packages fixed this. |
@k-maekawa & @athammer can you share code in a codesandbox? If this update affects other resolvers such as Zod we should revert the change. |
Hi. I still get the same error when use react-hook-form(7.16.0) and @hookform/resolvers(2.8.1). Do we have any way to workaround? Please see my codesanbox https://codesandbox.io/s/crazy-knuth-ylcsp?file=/src/App.tsx |
@huynd0902
|
@bluebill1049 So this is a official fix for this issue? Because the previous version I do not need to do this. But yesterday when I checked the docs. It say something like you show above. |
no, we are considering to revert back |
Hopefully, You will fix this issue soon because I really love this library. Thank you. |
7.16.0 solve the original issue above. the other issue is related to 2.8.1 #245 |
Types of parameters 'options' and 'options' are incompatible if you use a few selected elements of array in select. |
Hello.
Describe the bug
I updated react-hook-form 7.15.0, yupResolver raise following type error messages.
Same code with react-hook-form 7.14.2 works fine(no type error).
versions
To Reproduce
resolver
Codesandbox link (Required)
https://codesandbox.io/s/sad-wilson-rvpvv?file=/src/App.tsx:456-464
Expected behavior
No type error raised, or I want to know how to avoid type error
(react-hook-form 7.14.2 works fine)
Screenshots
Desktop (please complete the following information):
Additional context
None
Thank you!
The text was updated successfully, but these errors were encountered: