-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form: Fix form validation error when items are cleared (T1233487) #27435
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[missed scenario, local solution]
This is only a local solution, it does not work if we specify Form validationGroup property. (Don't forget to add a test)
Moreover, ideologically it's not very good that we make ValidationEngine knows about Form.
I suggest you adding _isRemovable
prop to the groupConfig and set it to true
when we add a group from Form and other places where it's expected to be non removable.
It will also simplify the condition in _shouldRemoveGroup
and make it much more intuitive.
Also I see that there is no test which checks that custom ValidationGroup is not removed after its validators are removed however this case is handled in the code. Please add a test for this.
1c192f8
to
4509333
Compare
No description provided.