Altinn / Altinn/app-lib-dotnet
Required validator is broken for `Likert`
- Dominant language
- C#
- Stars
- 8
- Forks
- 27
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 7
Description
### Description of the bug
Likert is a special case, since it has an answer binding that points to a field in a list of objects. Required in this case, means that all of the matching fields must not be empty, instead of the direct binding itself. This is not taken into account by `RunLayoutValidationsForRequiredRecurs` which simply gets the data at the exact path defined in the data-model binding. This works for components inside of repeating groups due to the row-context, but this does not exist for `Likert` "rows".
Likert likely needs its own special case for handling required validations.
Slack: https://altinn.slack.com/archives/C02EJ9HKQA3/p1710493234216779
### Steps To Reproduce
.
### Additional Information
_No response_
Contributor guide
Research direction
Start by tracing RunLayoutValidationsForRequiredRecurs and how it resolves data-model bindings for Likert components. Compare that with the row-context handling for components inside repeating groups; done means required validation checks every matching Likert row field rather than only the direct binding path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100