# Username must end with a letter or number or an underscore

**URL:** https://meta.discourse.org/t/username-must-end-with-a-letter-or-number-or-an-underscore/39823
**Category:** Bug
**Created:** [2월 18, 2016, 8:47오후 UTC](https://meta.discourse.org/t/username-must-end-with-a-letter-or-number-or-an-underscore/39823 "2016-02-18T20:47:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [2월 18, 2016, 8:47오후 UTC](https://meta.discourse.org/t/username-must-end-with-a-letter-or-number-or-an-underscore/39823/1 "2016-02-18T20:47:22Z")

</div>

So, the issue is simple.

When I try to save user preferences with nickname **vitalino4ka\_** an error is thrown:

> Username must end with a letter or number or an underscore

The username doesn’t look wrong, does it?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2월 18, 2016, 10:19오후 UTC](https://meta.discourse.org/t/username-must-end-with-a-letter-or-number-or-an-underscore/39823/3 "2016-02-18T22:19:25Z")

</div>

The username validation changed a bit and unfortunately the error message didn’t follow up.

The rules are defined in the “[`UsernameValidator`](https://github.com/discourse/discourse/blob/master/app/models/username_validator.rb)” class which states that the **username must end with alphanumeric**. (ie. no underscore)

I just pushed a fix 📝

[https://github.com/discourse/discourse/commit/e204144a582ec8c3a4424516b3b1b00d2b27655f](https://github.com/discourse/discourse/commit/e204144a582ec8c3a4424516b3b1b00d2b27655f)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2월 18, 2016, 10:20오후 UTC](https://meta.discourse.org/t/username-must-end-with-a-letter-or-number-or-an-underscore/39823/4 "2016-02-18T22:20:47Z")

</div>


