# Username Character Restrictions / Limits

**URL:** <https://forum.keycloak.org/t/username-character-restrictions-limits/4304>\
**Category:** Getting advice\
**Tags:** authentication\
**Created:** [August 15, 2020, 2:16am UTC](https://forum.keycloak.org/t/username-character-restrictions-limits/4304 "2020-08-15T02:16:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danmehta](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/danmehta/32/1244_2.png) [@danmehta](https://forum.keycloak.org/u/danmehta)\
**Post date:** [August 15, 2020, 2:16am UTC](https://forum.keycloak.org/t/username-character-restrictions-limits/4304/1 "2020-08-15T02:16:29Z")

</div>

I want to restrict what characters someone can use for a username as I am also using the username for another application with the following restrictions

can contain only letters, digits, ‘\_’, ‘-’ and ‘.’. Cannot start with ‘-’ or end in ‘.’, ‘.git’ or ‘.atom’.`

Any way to limit this on Keycloak?

Thank you

---

<div class="post-metadata">

**Author:** ![jivicari](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jivicari/32/7592_2.png) [@jivicari](https://forum.keycloak.org/u/jivicari)\
**Post date:** [February 21, 2023, 7:20am UTC](https://forum.keycloak.org/t/username-character-restrictions-limits/4304/2 "2023-02-21T07:20:50Z")

</div>

Hello. I have de same issue. could you solve this? thank you.
