Altinn / Altinn/app-lib-dotnet
Validate "required" expressions on fileUpload components
- Dominant language
- C#
- Stars
- 8
- Forks
- 27
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 7
Description
### Description
> Hei,
> Er det mulig å gjøre filopplasting/vedlegg påkrevd dersom annet felt ikke er utfylt?
Dersom et stort tekstfelt er tomt, skal fil-vedlegg være obligatorisk (= minst en fil lastet opp).
Har konfigurert fil-vedlegg komponenten med min 0 og maks er 1, og lagt på dynamisk regel som gjør filvedlegg påkrevd dersom tekstfelt er tomt.
Indikator for obligatorisk "*" på filvedlegget endrer seg, men ved forsøk på innsending for jeg ikke beskjed om at fil mangle
It should be possible to extend the required validation to ensure that the correct number of files exist for a file upload component.
Note that the component also have
```
"maxNumberOfAttachments": 1,
"minNumberOfAttachments": 1
```
which should be validated as well.
### Additional Information
_No response_
Contributor guide
Research direction
Start by locating the required-validation entry point for fileUpload components and the handling of minNumberOfAttachments and maxNumberOfAttachments. Verify how dynamic required rules are evaluated during submission; done means submissions reject missing, too few, or too many files according to the configured limits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100