Altinn / Altinn/app-frontend-react

Text/string countdown error circumvents normal validation logic

Open
#1,263 1 comment 0 reactions 1 assignee Claimed by @lassopicasso View on GitHub
area/validation kind/bug
Dominant language
TypeScript
Stars
21
Forks
33
Avg merge
6d 23h
Merged PRs (30d)
3

Description

### Description of the bug

We have a field in `frontend-test` called `newFirstName` that counts down and only allows 4 characters max. When you type more than 4 letters you get a visual error, however:
1. Even though the field triggers validation, no error message is visible in the error report on the bottom
2. Even when navigating and submitting, the user is not stopped, and submitting the form is entirely possible even with the error present.

This seems to be by design, as this countdown circumvents our normal validation system entirely, but it might be confusing to the user that some errors need to be addressed and fixed by them - but other errors are OK to ignore.

### Steps To Reproduce

See the cypress test `components.ts` -> `should countdown remaining letters`

### Additional Information

- #565
- #1193

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.