Skip to content

Show clearer error message when no service is provided for a social media link [WHIT-3140]#11235

Open
eYinka wants to merge 1 commit intomainfrom
social-media-account-error-msg
Open

Show clearer error message when no service is provided for a social media link [WHIT-3140]#11235
eYinka wants to merge 1 commit intomainfrom
social-media-account-error-msg

Conversation

@eYinka
Copy link
Contributor

@eYinka eYinka commented Mar 11, 2026

A user can now clearly see which service is missing, instead of blank quotes.

BEFORE:

image

AFTER:

image

JIRA: https://gov-uk.atlassian.net/browse/WHIT-3140


⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

This application is owned by the Whitehall Experience team. Please let us know in #govuk-whitehall-experience-tech when you raise any PRs.

Follow these steps if you are doing a Rails upgrade.

:invalid_social_media_link,
message: "invalid: no service provided for 'Social media account #{index + 1}'",
)
return nil
Copy link
Contributor

@TonyGDS TonyGDS Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this return false, I think it should be false for the duplicate check below as well

Copy link
Contributor

@TonyGDS TonyGDS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the ticket it mentions "Related discussion: blank social media sections may also cause server errors and should potentially be dropped on save". Was it discussed whether to drop lines where the name and url are blank?

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