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

FIO-9266,FIO-9267,FIO-9268: Fixes an issue where nested forms will be not validated if there are no data provided #190

Conversation

alexandraRamanenka
Copy link
Contributor

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-9266
https://formio.atlassian.net/browse/FIO-9267
https://formio.atlassian.net/browse/FIO-9268

Description

Previously, we were skipping processing any Nested Form's child components if there were no data provided for it (if the empty object was provided, it woould not skip though). That was causing an issue with submissions made through API that do not indlude data for the neste form, but must be still validated (because some fields of the child form are required, for example).
After discussion on the dev support we decide that the aussumptions that we can skip processing of nested form's child components if it has no data was wrong and we have to change it.

There are still some cases when we want to skip it: when the nested form's submission is saved as reference and its data is not attached (that means that the child form's data was already validated and saved to DB) or when the nested form itself should be hidden and cleared on hide.

Breaking Changes / Backwards Compatibility

Use this section to describe any potentially breaking changes this PR introduces or any effects this PR might have on backwards compatibility

Dependencies

Use this section to list any dependent changes/PRs in other Form.io modules

How has this PR been tested?

Use this section to describe how you tested your changes; if you haven't included automated tests, justify your reasoning

Checklist:

  • I have completed the above PR template
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • My changes include tests that prove my fix is effective (or that my feature works as intended)
  • New and existing unit/integration tests pass locally with my changes
  • Any dependent changes have corresponding PRs that are listed above

@travist
Copy link
Member

travist commented Nov 13, 2024

Please write a test. I am relying on those tests as I am in the process of refactoring the "path" issues.

Copy link
Member

@travist travist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please write a test.

@lane-formio lane-formio merged commit 555beb3 into master Nov 15, 2024
8 checks passed
lane-formio added a commit that referenced this pull request Dec 7, 2024
…rocessing-if-there-is-no-data

FIO-9266,FIO-9267,FIO-9268: Fixes an issue where nested forms will be not validated if there are no data provided
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants