Strange Behaviour when setting error in reactions and validator
#4045
Unanswered
DanielNguyen2512
asked this question in
Q&A [2.x]
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue
Apology that I don't know Chinese so it's hard to search related issue, may need your help to check this issue. Really appreciate it 🙏
Recently I encountered a case that needs your help to check
setSelfErrorshouldNotIncludeXReactionshouldNotIncludeYReactionThe 2 reactions conflict to each other, because the reactions will override the
selfError, so I write a utilremoveErrorMsgto only filter the error (can check the code below)validator, it has a strange behavior is to keep duplicate the error from validator (can check the video below)Screen.Recording.2023-12-12.at.4.18.58.PM.mov
Expected
The field should not duplicate the error from
validatorHow to reproduce
I tried to use the demo code in codesandbox, but somehow, when I installed the
@formily/antdpackage, the codesandbox kept bundling forever... So I leave a simple code below, you can reproduce it easilyBeta Was this translation helpful? Give feedback.
All reactions