question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Yup resolver validation seems to be unlinked with the form

See original GitHub issue

Describe the bug Using resolver, the synchronization between the form and/or the schema validation seems to be unlinked.

To Reproduce https://github.com/react-hook-form/resolvers/issues/28 https://github.com/react-hook-form/resolvers/issues/27

Codesandbox link (Required) https://codesandbox.io/s/polished-framework-ofvx8 https://codesandbox.io/s/magical-almeida-j941j?file=/src/App.js

Expected behavior All is on the two stories. I repost here because it seems to be link with the react hook form core. I expect to get the form validation the same as the yup validation. The first example is a simple form with yup and his when to target another value in the schema. Only the max errors respond to his own field. If you change the min value less than the max value we expect to have no more error. We can see the isValid form trigger properly but the message still there.

For the second example, for me it was the same use case. I inject a different context to the yup context but the form do not reflect the yup validation as expected. All are well explained in those stories. Hope you can track it easily. Thx in advance 😃

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:27 (14 by maintainers)

github_iconTop GitHub Comments

3reactions
Vandell63commented, Jul 15, 2020

@bluebill1049 thanks, first pr for me i will try 😃.

2reactions
Vandell63commented, Jul 18, 2020

No well it’s perfect @bluebill1049 thank you i did not get the rerender flow ( which follow the normal hook load cycle ) and now it is more clear. No need to go further with a feature request after this explanation ( it could be really great for the docs ). I’m completely agree with your mindset. I would love to have a live session together to help me understand the mindset you made into this library and help you more to contribute for this project. Thanks again for your time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-hook-form resolver type error using Yup - Stack Overflow
This looks like a library bug, downgrade @hookform/resolvers to 2.8.0 seems to fix the issue. Codesandbox Demo.
Read more >
Get Started | React Hook Form - Simple React forms validation
Step 1: Install Yup into your project. npm install @hookform/resolvers yup. Copy. Step 2: Prepare your schema for validation and register inputs with...
Read more >
Yup, you should use React Hook Form | by Evan Williams
Yup schemas fulfill several roles as it pertains to the application data. Not only is it performing validation for the form itself (in...
Read more >
mihoyo customer support email
Yup lately Mihoyo as Honkai Impact 3 Developer has released a beta for 39 t ... But it seems there is no possibility...
Read more >
@hookform/resolvers - npm
React Hook Form validation resolvers: Yup, Joi, Superstruct, Zod, Vest, Class Validator, io-ts, Nope, computed-types and Typanion.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found