cds-snc / cds-snc/platform-forms-client
Short answers: Character Limit vs Regex Validation
- Dominant language
- TypeScript
- Stars
- 46
- Forks
- 16
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 91
Description
## Description
[Support ticket #29578](https://gcdigital.slack.com/archives/C03T4FAE9FV/p1787083355998049)
For short-answer questions, adding a regex validation causes the character limit option to disappear from the editor.
However, if a character limit was configured before the regex was added, that character limit continues to be applied to the published form alongside the regex validation, and there's no way to remove it.
## Steps to reproduce
1. Add a short-answer question.
2. Configure a character limit.
3. Add regex validation.
4. The character limit setting disappears from the more Modal.
5. See Error: **Both the regex and previously configured character limit are still enforced, but there's no way to remove the character limit.**
## Expected behaviour
The character limit should either remain visible or be removed when a regex is added.
## Screenshots or videos
[Private Zenhub Video](https://api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBeERHRGc9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--6d40b5277365d19291358291372556526c4b1a27/Screen%20Recording%202026-08-18%20at%204.23.59%E2%80%AFPM.mov)
Contributor guide
Research direction
Reproduce the issue with a short-answer question in the editor: set a character limit, add regex validation, and inspect the More modal and published form. Trace the short-answer validation settings and confirm that the character-limit control remains available or that the previous limit is removed when regex validation is added.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100