You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi~ I have one question. I have a situation: firstname and lastname can't all be empty.When all of them are empty,all fields show error,but when one of them is not emty, there are no error.
I use yup as validator util and react hook form to achieve it.
when all fileds are empty just like this
But When i change onevalue,the other's error is still existed
Only triggering the blur event of the other input by myself can make the error disappear.
How can i manually trigger specified field's rule when change it's dependencing field value?
This is code example : example
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi~ I have one question. I have a situation: firstname and lastname can't all be empty.When all of them are empty,all fields show error,but when one of them is not emty, there are no error.



I use yup as validator util and react hook form to achieve it.
when all fileds are empty just like this
But When i change onevalue,the other's error is still existed
Only triggering the blur event of the other input by myself can make the error disappear.
How can i manually trigger specified field's rule when change it's dependencing field value?
This is code example :
example
Beta Was this translation helpful? Give feedback.
All reactions