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

Removed semi-automated and incorrect validation error handling in the From Builder. #968

Merged

Conversation

SG-Noxoreos
Copy link
Contributor

Description

Whenever any form element was changed, the Form Builder simply cleared out the error messages in the affected form elements. This interfered with the validationErrors prop that is given from outside.
Because of the semi-automated handling it was not possible to use the same validation error while the element is changed.
Now because the Form Builder is not the one creating the validation errors, it should leave removal to the parent component as well and only notify it, when any form actions created new validation errors.

Type of change

  • Bug Fix 🐛 (non-breaking change which fixes an issue)
  • Enhancement 🚀 (non-breaking change which adds functionality)
  • Breaking Change 💥 (fix or feature that would cause existing functionality to not work as expected)
  • Polish 💅 (Just some cleanups)
  • Internal 🏠 Only relates to internal processes.

How to test it

Create a new form using the Form Builder and pass in validation errors. They should now only change, when the prop to the Form Builder changes and it should immediately be visible when this prop is changed. The handleChange prop now gets a third param with new validation errors, but as of right now no validation actions exist, yet, so this param will be an empty array.

@SG-Noxoreos SG-Noxoreos added the bug Something isn't working label Mar 19, 2020
@SG-Noxoreos SG-Noxoreos self-assigned this Mar 19, 2020
@alexbridge alexbridge merged commit 819528d into v6.13.0 Mar 20, 2020
@alexbridge alexbridge deleted the PWA-2544-fix-form-builder-validation-error-behavior branch March 20, 2020 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants