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
-
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
setSelfError
shouldNotIncludeXReaction
shouldNotIncludeYReaction
The 2 reactions conflict to each other, because the reactions will override the
selfError
, so I write a utilremoveErrorMsg
to 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
validator
How to reproduce
I tried to use the demo code in codesandbox, but somehow, when I installed the
@formily/antd
package, 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