# Optie om gebruikersnaam niet te laten beginnen of eindigen met alfanumerieke tekens

**URL:** https://meta.discourse.org/t/option-for-username-not-to-be-required-to-start-or-end-with-alphanumeric/353595
**Category:** Feature
**Created:** [21 februari 2025 om 12:19 UTC](https://meta.discourse.org/t/option-for-username-not-to-be-required-to-start-or-end-with-alphanumeric/353595 "2025-02-21T12:19:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![NubeBuster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nubebuster/32/371096_2.png) [@NubeBuster](https://meta.discourse.org/u/NubeBuster)
#### Post date: [21 februari 2025 om 12:19 UTC](https://meta.discourse.org/t/option-for-username-not-to-be-required-to-start-or-end-with-alphanumeric/353595/1 "2025-02-21T12:19:36Z")

</div>

Hi,

I run Discourse for a Minecraft community. I require users to register from inside the game so that each user on the forums is a real Minecraft player. I’ve successfully set this up using the API of Discourse. So far great!

Now I’ve run into a problem. One user, called SomeName\_ in Minecraft tried to sign up, resulting in the (Discourse produced) message:

 ![The image shows a notification screen with a message stating "Account creation failed: Username must end with a letter or a number" alongside a green background and pixelated style. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/5/9/0/59009b2c2f0410a46ff4579a5ce18ca3080eb602.png)

I’ve looked in the settings and I saw no site setting that allows disabling this feature.  
[Looking into the code](https://github.com/discourse/discourse/blob/e26a1175d7c33746bddbc858ad89e68cc14beefe/app/models/username_validator.rb#L134) it turns out not to have a setting.

My question is, is this due to technical limitations in Discourse? Moreover, can I attempt to add a site setting to disable this and make a PR?

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [22 februari 2025 om 03:23 UTC](https://meta.discourse.org/t/option-for-username-not-to-be-required-to-start-or-end-with-alphanumeric/353595/2 "2025-02-22T03:23:33Z")

</div>

A pr may work. Though if you’re self hosted. Making a plugin likely better or in conjunction with. As a pr may or may not be merged depending on a variety of factors.

---

<div class="post-metadata">

### Author: ![NubeBuster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nubebuster/32/371096_2.png) [@NubeBuster](https://meta.discourse.org/u/NubeBuster)
#### Post date: [22 februari 2025 om 19:47 UTC](https://meta.discourse.org/t/option-for-username-not-to-be-required-to-start-or-end-with-alphanumeric/353595/3 "2025-02-22T19:47:58Z")

</div>

I’ve once spoken with someone about ruby. Is this doable with a plugin? I heard him mention I can override functions, such as in this case the validator. Is this correct?

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [22 februari 2025 om 22:55 UTC](https://meta.discourse.org/t/option-for-username-not-to-be-required-to-start-or-end-with-alphanumeric/353595/4 "2025-02-22T22:55:43Z")

</div>

Unfortunately I don’t have the experience to be able to give a definite answer. But I believe it should be possible as plugins directly alter things on the server side. One of the team or more experienced plugin authors would be best resource.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [22 februari 2025 om 23:25 UTC](https://meta.discourse.org/t/option-for-username-not-to-be-required-to-start-or-end-with-alphanumeric/353595/5 "2025-02-22T23:25:25Z")

</div>

It would be interesting to know why this rule is enforced, and if a username starting or ending with a non-alphanumeric character would cause issues.
