Skip to content
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

Merged
merged 17 commits into from
Jun 24, 2024

Conversation

jdvictoria
Copy link
Contributor

No description provided.

@jdvictoria jdvictoria self-assigned this May 21, 2024
@jdvictoria jdvictoria requested review from a team and AlexanderMoiseev May 22, 2024 06:47
Copy link
Contributor

@ksercs ksercs left a 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.

packages/devextreme/js/ui/validation_engine.js Outdated Show resolved Hide resolved
packages/devextreme/js/ui/validation_engine.js Outdated Show resolved Hide resolved
@jdvictoria jdvictoria reopened this Jun 13, 2024
@jdvictoria jdvictoria requested a review from ksercs June 19, 2024 13:43
@jdvictoria jdvictoria requested a review from ksercs June 19, 2024 15:09
@jdvictoria jdvictoria merged commit e1d72a3 into DevExpress:24_1 Jun 24, 2024
267 of 268 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants