Altinn / Altinn/app-frontend-react
maxLength på input/textarea-komponentene bør stoppe sidenavigasjon og innsending
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 33
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
### Description
Settinga maxLength gir tilbakemelding til bruker om hvor mange tegn de kan skrive inn. Hvis bruker skriver inn mer tegn enn satt på komponenten vil en rød feilmelding vises. Det er misvisende at feilen ikke stopper sidenavigasjon eller innsending selv om den er rød. Hvis man vil faktisk stoppe innsending må man lage en separat validering, men da vil bruker få to feilmeldinger istedenfor en.
maxLength burde ha lignende oppførsel som required som både stopper sidenavigasjon og innsending.
Slack: https://digdir-samarbeid.slack.com/archives/C02EJ9HKQA3/p1778139988157369
### Additional Information
_No response_
Contributor guide
Research direction
Start by locating the input and textarea components and compare how maxLength and required are handled. Check the navigation and submission paths where required blocks progress, then make maxLength behave consistently and verify that the existing red error prevents both actions without producing a duplicate validation message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100