Only accept letters, numbers and underscores in a textbox

Hi!
I am creating a new app and in the username textbox I only want to allow letters, numbers and underscores. How can I do that?
Thanks for your help!


me my friend use this. in @ place you type which letter you dont want

It’s a nice idea!
But there are so many characters that I don’t want the users to enter…
Do you know another way that uses the characters that the users can enter?
Thank you very much

you make many blocks so many not allow letter

Use regex, I think you can try the aia from this thread

Hi!
I used Regex in other project, and it worked very well, but I don’t know how to let the user also use underscores

You are lucky, I just opened the project

Pattern what is allowed [^a-zA-Z 0-9/@%!"#?¨’_.,]

4 Likes

Thank you very much!
I was just looking in the Regex website. Thank you very much for the pattern!

1 Like

Thank you very much for your answer!
Now i’m gonna use the regular expressions, but I appreciate very much your answers.
Have a nice day!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.