![]() |
Username Regular Expression
Hello,
In my board, have the below setting - User Registration Options > Username Regular Expression - ^[A-Z0-9]+$ so that it allows alpha numeric characters in user names. But am looking for expression that does not allow user names that has ONLY numbers like - "12345". How do I set this? Thanks in advance. |
I found this: ^\d*[a-zA-Z][a-zA-Z0-9]*$
here: http://stackoverflow.com/questions/1...-one-character. It allows lower case, but you could take out the lower case ranges if you want (or I guess it doesn't matter to vbulletin). |
Hello Kh99,
Thanks for the response. Yes it seems to be working good but I would also want to disallow user names that starts with numbers like - "1234test". In such a scenario how do you think the regex need to be? Do you think this will work - ^[a-zA-Z][a-zA-Z0-9]+$ |
Yes, I believe you'd just want to remove the \d* from the beginning. You could change the last * to + as you've done, but I think that would just require the username to be at least 2 characters, and vbulletin already requires at least 3.
|
Thanks Kh99,
It did work good. |
All times are GMT. The time now is 11:21 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|