Block numbers in usernames at registration
Page 1 of 1
Block numbers in usernames at registration
Block numbers in usernames at registration |
This tutorial will allow you to prevent usernames that contain numbers at registration, as in the example below. Setting up Go to Administration Panel > Modules > JavaScript Codes management and create a new script. Title : Your choice Placement : In all the pages
Variants The script uses a regular expression( /^[^0-9]*$/ ) to detect if the username contains a digit. Here are a few websites with tutorials on regular expressions : And some examples that could take the place of /^[^0-9]*$/ : Only allow usernames that contain digits :
Only allow usernames that contain 0 or 1 :
Only allow usernames that contain 3 words of 3-10 characters ( without a number ) :
Don't allow usernames that contain special characters :
|
This tutorial was written by Ea of the French Support Forum, Translated to English by Ange Tuteur. |
SarkZKalie likes this post
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum