Skip to content

Fix markdown length validation for exit pages - #3067

Merged
thomasiles merged 3 commits into
mainfrom
fix-exit-pages-screen
Sep 3, 2026
Merged

Fix markdown length validation for exit pages#3067
thomasiles merged 3 commits into
mainfrom
fix-exit-pages-screen

Conversation

@thomasiles

Copy link
Copy Markdown
Contributor

When the char count for the markdown field is too long, the error cannot be displayed because the translations assumed the count field was available.

As the error is checked in the markdown gem and added to the model in the our validator, it doesn't set the count field.

I looked at different ways of making the count available. I don't think it's worth making wider code changes though. Instead, I've hardcoded the 5000 character limit in the translations.

What problem does this pull request solve?

Trello card:

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

When the char count for the markdown field is too long, the error cannot
be displayed because the translations assumed the count field was
available.

As the error is checked in the markdown gem and added to the model in
the our validator, it doesn't set the count field.

I looked at different ways of making the count available. I don't think
it's worth making wider code changes though. Instead, I've hardcoded the
5000 character limit in the translations.
@thomasiles
thomasiles marked this pull request as ready for review August 26, 2026 14:53
Comment thread config/locales/input_objects/exit_pages.yml Outdated
Correct char count

Co-authored-by: David Biddle <david.biddle@digital.cabinet-office.gov.uk>
Comment thread config/locales/input_objects/update_exit_pages.yml Outdated
Co-authored-by: David Biddle <david.biddle@digital.cabinet-office.gov.uk>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-3067.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

@thomasiles
thomasiles added this pull request to the merge queue Sep 3, 2026
Merged via the queue into main with commit ba38b24 Sep 3, 2026
3 checks passed
@thomasiles
thomasiles deleted the fix-exit-pages-screen branch September 3, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants