Add validation to display name input#7822
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
85f9622 to
bc3b3f3
Compare
|
Ah sorry ignore what I wrote, I thought this was username at first as we have a ticket for that too. |
|
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:
|
| "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", |
There was a problem hiding this comment.
| "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!
There was a problem hiding this comment.
@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) 😅
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
sure, will take a look at the backend now
|
Hey @AndyMcGN is this ready for review? Feel free to tag me when it is so I know! |
|
@nabramow yes, this is ready for review, sorry for the delay! Added validation to backend too, see the pr below :) |
nabramow
left a comment
There was a problem hiding this comment.
This looks good to me now! Let's make sure to merge this one before the backend one!
📝 Release NotesThis PR should be included in the release notes. Suggested release note: 🤖 Bot Debug InformationModel: |

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
developif necessary for linear migration historyWeb frontend checklist
For maintainers