From c261405425f983de002c6233695762968cbfc630 Mon Sep 17 00:00:00 2001 From: Thomas Iles Date: Wed, 26 Aug 2026 13:17:05 +0100 Subject: [PATCH 1/3] Fix markdown length validation for exit pages 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. --- config/locales/input_objects/exit_pages.yml | 2 +- config/locales/input_objects/update_exit_pages.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/input_objects/exit_pages.yml b/config/locales/input_objects/exit_pages.yml index 08efbbd934..bb2d25cad7 100644 --- a/config/locales/input_objects/exit_pages.yml +++ b/config/locales/input_objects/exit_pages.yml @@ -10,7 +10,7 @@ en: too_long: Page heading must be %{count} characters or less markdown: blank: Enter page content - too_long: Page content must be %{count} characters or less + too_long: Page content must be 5000 characters or less unsupported_markdown_syntax: Page content can only contain formatting for links, subheadings (##), bulleted lists (*), or numbered lists (1.) helpers: hint: diff --git a/config/locales/input_objects/update_exit_pages.yml b/config/locales/input_objects/update_exit_pages.yml index 3fecc8b811..e521989cf6 100644 --- a/config/locales/input_objects/update_exit_pages.yml +++ b/config/locales/input_objects/update_exit_pages.yml @@ -10,7 +10,7 @@ en: too_long: Page heading must be %{count} characters or less markdown: blank: Enter page content - too_long: Page content must be %{count} characters or less + too_long: Page content must be 5000 characters or less unsupported_markdown_syntax: Page content can only contain formatting for links, subheadings (##), bulleted lists (*), or numbered lists (1.) helpers: hint: From 6291bca999016472a8e07b7614950bcdfaea55e4 Mon Sep 17 00:00:00 2001 From: Thomas Iles Date: Wed, 2 Sep 2026 09:49:50 +0100 Subject: [PATCH 2/3] Update config/locales/input_objects/exit_pages.yml Correct char count Co-authored-by: David Biddle --- config/locales/input_objects/exit_pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/input_objects/exit_pages.yml b/config/locales/input_objects/exit_pages.yml index bb2d25cad7..784de86d33 100644 --- a/config/locales/input_objects/exit_pages.yml +++ b/config/locales/input_objects/exit_pages.yml @@ -10,7 +10,7 @@ en: too_long: Page heading must be %{count} characters or less markdown: blank: Enter page content - too_long: Page content must be 5000 characters or less + too_long: Page content must be 4,999 characters or less unsupported_markdown_syntax: Page content can only contain formatting for links, subheadings (##), bulleted lists (*), or numbered lists (1.) helpers: hint: From 2af29056f377ad32236cce57b14913a55ffe8026 Mon Sep 17 00:00:00 2001 From: Thomas Iles Date: Thu, 3 Sep 2026 10:49:09 +0100 Subject: [PATCH 3/3] Update config/locales/input_objects/update_exit_pages.yml Co-authored-by: David Biddle --- config/locales/input_objects/update_exit_pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/input_objects/update_exit_pages.yml b/config/locales/input_objects/update_exit_pages.yml index e521989cf6..04c7d11f6a 100644 --- a/config/locales/input_objects/update_exit_pages.yml +++ b/config/locales/input_objects/update_exit_pages.yml @@ -10,7 +10,7 @@ en: too_long: Page heading must be %{count} characters or less markdown: blank: Enter page content - too_long: Page content must be 5000 characters or less + too_long: Page content must be 4,999 characters or less unsupported_markdown_syntax: Page content can only contain formatting for links, subheadings (##), bulleted lists (*), or numbered lists (1.) helpers: hint: