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-8632: Fixes an issue where required validation is not triggered for multiple value components like Select if it has no values added #130

Merged

Conversation

alexandraRamanenka
Copy link
Contributor

https://formio.atlassian.net/browse/FIO-8632

Description

The check I removed was added for the https://formio.atlassian.net/browse/FIO-8336, but the issue is we have Multiple Value flag working differently with different components. For some of them (like Text Field) it treats each value separetely (so if we set Requied validation, it will make sure that we have at least 1 value in the array and that we don't have any empty values in the array even if it has 1 or more values) and some components as a Select one with Multiple Valu flag looks still as a single component with one row, but allows add multiple value, so the required validation should check the whole value

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

alexandraRamanenka and others added 2 commits August 6, 2024 16:56
…or multiple value components like Select if it has no values added
Copy link
Contributor

@brendanbond brendanbond left a comment

Choose a reason for hiding this comment

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

Tests are failing

@alexandraRamanenka alexandraRamanenka force-pushed the fio-8632-multiple-value-components-required-validation branch from d589023 to 276a3a7 Compare August 9, 2024 12:12
@alexandraRamanenka alexandraRamanenka force-pushed the fio-8632-multiple-value-components-required-validation branch from 276a3a7 to 700e9e9 Compare August 9, 2024 13:46
@lane-formio lane-formio changed the title valiFIO-8632: Fixes an issue where required validation is not triggered f… FIO-8632: Fixes an issue where required validation is not triggered f… Aug 15, 2024
@lane-formio lane-formio changed the title FIO-8632: Fixes an issue where required validation is not triggered f… FIO-8632: Fixes an issue where required validation is not triggered for multiple value components like Select if it has no values added Aug 15, 2024
@travist
Copy link
Member

travist commented Aug 15, 2024

Please talk with Alexey about this change. He explicitly made a change to fix something here f4a904b. I want to ensure that whatever he was fixing will now not be broken when we pull this change into place.

Also, I would like to see a test that also tests for the case that Alexey was fixing with his change.

@brendanbond brendanbond merged commit 1a100f3 into master Oct 11, 2024
8 checks passed
lane-formio pushed a commit that referenced this pull request Oct 15, 2024
…s-required-validation

FIO-8632: Fixes an issue where required validation is not triggered for multiple value components like Select if it has no values added
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