Comments (8)
Yes i see now sorry. You're right !. The error disappear only when you change the Max
value. But when you change the min value only the isValid
property trigger. But the error don't disappear.
So point 1 and 2 correct but not the third one. :/ . I continue to investigate
I'm pretty sure that it is linked with -> #28
Where the form is not sync with the schema after a first validation
from resolvers.
Thanks @bluebill1049! I'm closing the issue then.
from resolvers.
Hey @Mathius17 i have check your code and i found some issue and misunderstood of how yup work when you want to check two values.
- you should remove your schema from your component
- you should test your logic in the schema directly
I suggest you an alternative to your code here -> https://codesandbox.io/s/infallible-panini-uz2ri?file=/src/App.js
Hope your understand the difference and the yup logic behind.
There is no issue here in the react-hook-form
But i found one with yup. i will open a new issue for this.
from resolvers.
@Vandell63 I just checked your alternative code again and repeating the "Steps to reproduce" in your example is giving me the same results unfortunately.
I can dig deeper and make a PR if necessary, but I'm trying to understand first where the error comes from.
from resolvers.
Thank you very much @Vandell63! I definitely like your approach way more and now I have a better understanding of how to check two fields dependent on each other in Yup.
One last question just to make sure we're on the same page. The issue still remains, right? Although is a problem with Yup itself.
from resolvers.
No sorry, your issue is fixed for me.
i just got another another issue with yup about context object inject into the form. Sorry it is independent from your case.
I think we have resolve it right ?
from resolvers.
Thanks, guys, will investigate the cause of the issue.
from resolvers.
react hook form validate a single field at a time (this allow us to optimize render), if you need to depend field to trigger validation, you can use trigger
.
from resolvers.
Related Issues (20)
- Valibot - Optional not found
- issue: Valibot resolver optional not Found HOT 1
- AJV Resolver - When ajv schema contains `default` for certain properties, `getValues()` returns the form data with properties overwritten
- typescript type error for yupResolver HOT 22
- Not Possible to use Zod omit on schema passed to resolver HOT 1
- Zod continues to throw errors while using async refinements with react hook form when zod resolver mode is set to async HOT 2
- Issue with valibotResolver causing unexpected form submission behavior HOT 3
- typescript problem in AJV resolver HOT 1
- Fields configured as mandatory are not being validated and are ignored.
- errors object creating circular structure with yup resolver
- Zod superRefine does not correctly revalidate the form on change HOT 2
- Issue with Resolvers tranform
- Extend typeboxResolver with additional types; getting "Unknown type" in Visit3
- AJV resolver is async mode is not working
- Support `@effect/schema` HOT 4
- when type of input is radio,valueAsNumber dont work anymore HOT 1
- `Joi` resolver crashes on `File` validation
- When using `classValidatorResolver`, combining `@IsOptional()` with `@Length()` makes the field required
- [Zod]: Resolver does not validate to reflect correct error state without manual form.trigger() HOT 8
- zodResolver / superRefine / useFieldArray: useForm errors are not updated to reflect zodResolver errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from resolvers.