Skip to content

Add validation to display name input#7822

Merged
nabramow merged 6 commits into
developfrom
web/task/display-name-validation
Mar 17, 2026
Merged

Add validation to display name input#7822
nabramow merged 6 commits into
developfrom
web/task/display-name-validation

Conversation

@AndyMcGN

@AndyMcGN AndyMcGN commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Describe briefly what this PR is doing and why.

Completes this issue about the lack of validation of the display name during sign up.

Testing

Explain how you tested this PR and give clear steps so the reviewer can replicate.

Backend checklist

  • Added tests for any new code or added a regression test if fixing a bug
  • Run the backend locally and it works
  • Added migrations if there are any database changes, rebased onto develop if necessary for linear migration history

Web frontend checklist

  • There are no console warnings when running the app
  • Added tests where relevant
  • Clicked around my changes running locally and it works
  • Checked Desktop, Mobile and Tablet screen sizes

For maintainers

  • Maintainers can push commits to my branch
  • Maintainers can merge this PR for me

@AndyMcGN
AndyMcGN requested a review from nabramow as a code owner February 3, 2026 21:13
@vercel

vercel Bot commented Feb 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
couchers Ready Ready Preview Mar 16, 2026 11:44am

Request Review

@nabramow

nabramow commented Feb 9, 2026

Copy link
Copy Markdown
Member

Ah sorry ignore what I wrote, I thought this was username at first as we have a ticket for that too.

@nabramow

nabramow commented Feb 9, 2026

Copy link
Copy Markdown
Member

Okay this is almost there, thanks for picking this up @AndyMcGN!

I think we should also disallow numbers entirely for display name as well and only allow lowercase and capital letters and spaces. Right now I can start with a number and it's not giving me any error:

Screenshot 2026-02-09 at 11 31 23

Comment thread app/web/features/auth/locales/en.json Outdated
"empty_error": "Please enter your name",
"required_error": "This field can't be empty."
"required_error": "This field can't be empty",
"invalid_characters_error": "Name can only contain letters, numbers, spaces, hyphens, and apostrophes",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"invalid_characters_error": "Name can only contain letters, numbers, spaces, hyphens, and apostrophes",
"invalid_characters_error": "Name can only contain letters, spaces, hyphens, and apostrophes",

Let's do this and remove the numbers!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@nabramow thanks for reviewing! Just to be clear, you're saying we should remove 'numbers, ' from the string here and continue to allow them in the validation?
or remove the numbers from the validation (but then i guess keep the string here as it) 😅

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@AndyMcGN Also remove them from the allowed characters in the validation!

We should probably also do that on backend too. Not sure if you're able to do backend? If not I will make a ticket for it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure, will take a look at the backend now

@nabramow

nabramow commented Mar 2, 2026

Copy link
Copy Markdown
Member

Hey @AndyMcGN is this ready for review? Feel free to tag me when it is so I know!

@AndyMcGN

AndyMcGN commented Mar 7, 2026

Copy link
Copy Markdown
Contributor Author

@nabramow yes, this is ready for review, sorry for the delay! Added validation to backend too, see the pr below :)

@nabramow nabramow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me now! Let's make sure to merge this one before the backend one!

@nabramow
nabramow merged commit acbc1b2 into develop Mar 17, 2026
10 checks passed
@nabramow
nabramow deleted the web/task/display-name-validation branch March 17, 2026 03:48
@github-actions github-actions Bot added the release notes: pending Add to stuff that should be included in release notes label Mar 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📝 Release Notes

This PR should be included in the release notes.

Suggested release note:

Added display name validation during sign-up to prevent invalid names and show clearer error messages
🤖 Bot Debug Information

Model: couchers.openai.gpt-5.4
Decision: include
Reasoning: This improves the signup flow by preventing invalid display names and giving clear feedback, which is a noticeable user-facing bug fix affecting new users creating accounts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: pending Add to stuff that should be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Sign UP]Add validation message to display name field

2 participants