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
My form is being API driven API, and based on field value, validation for a particular field can change. I've prepared very simple sandbox that replicates my issue.
If Age field is empty, Website will display Other Validation Message,
If Age field is filled , Website will display Validation Message,
Problem is, Website error only changes when I focus on this field and blur it, even though in resolver function yupResolver already has this error correctly (see console output)
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.
-
My form is being API driven API, and based on field value, validation for a particular field can change. I've prepared very simple sandbox that replicates my issue.
Age
field is empty,Website
will displayOther Validation Message
,Age
field is filled ,Website
will displayValidation Message
,Problem is,
Website
error only changes when I focus on this field and blur it, even though inresolver
functionyupResolver
already has this error correctly (see console output)CodeSandbox: https://codesandbox.io/s/rhf-validation-based-on-other-field-9qxlsy
Gif of my issue:

Beta Was this translation helpful? Give feedback.
All reactions