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
Firstly, thanks for a great library/package. It is ace and I am loving it 👍
I am seeing some strange behaviour using trigger with yup.test. I wanted to clarify whether it is intended behaviour, if I am being a dummy, or if there is in fact an issue. 🤔
Scenario
I have two input fields for two different IDs: eId and visualId
I call yup.trigger("eId") when the eId input field is blurred to trigger the eId test.
Expected Behaviour
When calling methods.trigger("eId") the yup.test() for the eId should run.
Actual behaviour
When calling methods.trigger("eId") the tests for both IDs are triggered.
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello 👋
Firstly, thanks for a great library/package. It is ace and I am loving it 👍
I am seeing some strange behaviour using
trigger
withyup.test
. I wanted to clarify whether it is intended behaviour, if I am being a dummy, or if there is in fact an issue. 🤔Scenario
eId
andvisualId
yup.trigger("eId")
when theeId
input field is blurred to trigger theeId
test.Expected Behaviour
methods.trigger("eId")
theyup.test()
for theeId
should run.Actual behaviour
methods.trigger("eId")
the tests for both IDs are triggered.I've created a minimal example here illustrating the above: https://codesandbox.io/s/multiple-tests-triggered-at-once-gpdc55?file=/src/App.tsx.
Hope a friendly soul out there can help. Many thanks 🙏
Dependencies
"@hookform/resolvers": "3.3.2",
"loader-utils": "3.2.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "7.48.2",
"react-scripts": "5.0.1",
"yup": "1.3.2"
Beta Was this translation helpful? Give feedback.
All reactions