Why is my conditional validation not working using zod and react-hook-form?
Good Day! I’m having a little trouble after refactoring my code, I created a conditional field wherein if the user selected Yes
there will an additional field below wherein the user must answer it. And if the user selected No
it will be just an empty string.
Why do I need to refresh or go to another tab before the field shows?
so I’m almost finish with my update form
but I’ve got a problem in my conditional field. So I have a select field wherein it will show a conditional field depending on the selected value, but the problem I’m encountering right now, is I need to refresh or click another tab before showing.
How can I make the value I pass to my defaultValue controllable?
so I’m trying to create an update function in my select field wherein it’s defaultValue
will be coming from database and make it controllable? I’m using react-hook-form
and zod
for form validation. So this is what I did.