What are the Discourse rules for usernames?

AI-generated summary

The discussion revolves around the rules for usernames in Discourse. abi_at_work inquired about the allowed characters in usernames, specifically ampersands and apostrophes. pfaffman suggested trying to create usernames on try.discourse.com or checking the code on GitHub for the exact rules. simon confirmed that ampersands and apostrophes are not allowed in usernames, as they must only include numbers, letters, dashes, dots, and underscores.

Hello, please can someone point me in the direction of the rules for usernames? I’m trying to establish if ampersands and apostrophes are allowed or not but I cannot find anything in here that helps me. Many thanks.

Welcome, @abi_at_work!

An easy way to answer your question empirically is to go to try.discourse.com and see what usernames you can create there!

If you want to know exactly, you can look at the code:

No, it is not possible to use & or ' in a username. If a user attempts to signup for a Discourse site with one of those characters in their username, they will see the following message ( must only include numbers, letters, dashes, dots, and underscores):

Thank you @pfaffman I couldn’t tell if it was configurable or not, but it seems not which would explain why I couldn’t find it. Thank you for the reply.

I thought it might be able to be done in the Allow username Unicode Characters bit of the set up