# How do I make it so my users can't add any special characters in their usernames?

**URL:** <https://community.glideapps.com/t/how-do-i-make-it-so-my-users-cant-add-any-special-characters-in-their-usernames/67026>\
**Category:** Ask for Help\
**Created:** [October 16, 2023, 7:52pm UTC](https://community.glideapps.com/t/how-do-i-make-it-so-my-users-cant-add-any-special-characters-in-their-usernames/67026 "2023-10-16T19:52:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![callum](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/callum/32/65236_2.png) [@callum](https://community.glideapps.com/u/callum)\
**Post date:** [October 16, 2023, 7:52pm UTC](https://community.glideapps.com/t/how-do-i-make-it-so-my-users-cant-add-any-special-characters-in-their-usernames/67026/1 "2023-10-16T19:52:57Z")

</div>

Hi! Still working on my social media app as usual. I showed some of my friends my app and they found out they could add special characters to their usernames. How do I prevent this?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [October 16, 2023, 9:54pm UTC](https://community.glideapps.com/t/how-do-i-make-it-so-my-users-cant-add-any-special-characters-in-their-usernames/67026/2 "2023-10-16T21:54:59Z")

</div>

You’ll need to use what we call a “custom form” (not a form screen) to check if they’re entering special characters. I might actually use a “hybrid form” for this.

> [@Radar Address Complete in Form](https://community.glideapps.com/t/radar-address-complete-in-form/63658/6):
>
> What I’ve been doing lately is to use what I’m calling “hybrid” forms: show new screen action instead of form screen add an input component for any input you want to validate against another table (using relations, etc) add a form container beneath the input for the remainder of the form, but only display the form container if the input outside of the form container is “valid”. This way you still have a form experience with less updates but can still leverage the custom form experience for th…

You can check for special characters using either a JavaScript or extract matching text column.

I’ll see if I can find an example of something I did recently.

---

<div class="post-metadata">

**Author:** ![callum](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/callum/32/65236_2.png) [@callum](https://community.glideapps.com/u/callum)\
**Post date:** [October 17, 2023, 1:49pm UTC](https://community.glideapps.com/t/how-do-i-make-it-so-my-users-cant-add-any-special-characters-in-their-usernames/67026/3 "2023-10-17T13:49:02Z")

</div>

This will most likely help. I wanna make sure that this can prevent every single symbol besides dots or underscores.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 17, 2023, 1:59pm UTC](https://community.glideapps.com/t/how-do-i-make-it-so-my-users-cant-add-any-special-characters-in-their-usernames/67026/4 "2023-10-17T13:59:57Z")

</div>

Then you have to make sure you can get a regex snippet that works, or specify all characters that shouldn’t be there (a long way to go).
