Skip to content

Repeating groups: Validation trigger for single row #468

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

Closed
olemartinorg opened this issue Sep 14, 2022 · 1 comment · Fixed by #594
Closed

Repeating groups: Validation trigger for single row #468

olemartinorg opened this issue Sep 14, 2022 · 1 comment · Fixed by #594
Labels
area/validation related to form validation rules/messages kind/feature-request New feature or request org/ssb Issues relevant for Statistisk sentralbyrå. ux Needs some love from a UX resource

Comments

@olemartinorg
Copy link
Contributor

olemartinorg commented Sep 14, 2022

Description

Currently, adding "triggers": ["validation"] on a repeating group element will trigger validation for all rows inside the group when attempting to save/close one row. This is not what one might intuitively expect.

Suggestions

  1. Either make the validation trigger for repeating groups trigger validation for the row (a breaking change) and optionally introduce a new validateRows or validateAllRows specifically for groups, where all rows are validated (as they were before), if this is functionality we need.
  2. Or introduce a new validateRow trigger for repeating groups, which only validates the current row, leaving the validation trigger as it is now.

Example

The current solution leads to lots of noise in the UI when saving a row in a repeating group you haven't started filling out yet. This example is taken from an app that creates semi-filled rows the user have to expand to fill, but saving one of them validates all of them:

bug-all-rows-validated

@olemartinorg olemartinorg added kind/feature-request New feature or request org/ssb Issues relevant for Statistisk sentralbyrå. ux Needs some love from a UX resource labels Sep 14, 2022
@Magnusrm Magnusrm moved this from 📈 Todo to ⚠ Blocked in Improvements repeating groups Sep 14, 2022
@Magnusrm
Copy link
Contributor

Magnusrm commented Sep 19, 2022

Implementing this feature might solve the bug:
Input felt med skjul vis regel i repeterende gruppe valideres ikke som det skal #296

@rvessb rvessb added this to Issues SSB Oct 7, 2022
@Magnusrm Magnusrm moved this to 📈 Todo in Team Apps Oct 12, 2022
@Magnusrm Magnusrm moved this from 📈 Todo to ⚠️ Blocked in Team Apps Oct 12, 2022
@olemartinorg olemartinorg moved this from ⚠️ Blocked to 📈 Todo in Team Apps Oct 26, 2022
@bjosttveit bjosttveit self-assigned this Oct 31, 2022
@bjosttveit bjosttveit moved this from 📈 Todo to 👷 In Progress in Team Apps Oct 31, 2022
@bjosttveit bjosttveit linked a pull request Oct 31, 2022 that will close this issue
5 tasks
@bjosttveit bjosttveit removed their assignment Nov 2, 2022
@bjosttveit bjosttveit moved this from 👷 In Progress to 🔎 Review in Team Apps Nov 2, 2022
Repository owner moved this from ⚠ Blocked to 🧪 Testing in Improvements repeating groups Nov 2, 2022
Repository owner moved this from 🔎 Review to ✅ Done in Team Apps Nov 2, 2022
@bjosttveit bjosttveit moved this to Done in Issues SSB Nov 2, 2022
@olemartinorg olemartinorg added the area/validation related to form validation rules/messages label Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/validation related to form validation rules/messages kind/feature-request New feature or request org/ssb Issues relevant for Statistisk sentralbyrå. ux Needs some love from a UX resource
Projects
Archived in project
Archived in project
Status: 🧪 Testing
Development

Successfully merging a pull request may close this issue.

3 participants