Jaxel
Well-known member
I have some obscure rules to my username registration...
Username Regular Expression Match:
A username must START with an alpha-numeric character
A username can only have alpha-numeric, underscore, dash, period, @
A username must END with an alpha-numeric character
A username must have between 3 and 15 characters.
We were using this format in the past due to compatibility with MediaWiki, back when we were still using it. MediaWiki really wasn't designed for user_id; and it's users were stored through usernames... thats why this was done. It has just sort of hung around since then and I haven't seen the need to change it.
The problem is... if someone tries to register that violates the format they get the following error:
I would like to give them a more thorough error message. How would I do this?
Username Regular Expression Match:
Code:
^[A-Za-z0-9][\w\-\.\@]+[A-Za-z0-9]$
A username must START with an alpha-numeric character
A username can only have alpha-numeric, underscore, dash, period, @
A username must END with an alpha-numeric character
A username must have between 3 and 15 characters.
We were using this format in the past due to compatibility with MediaWiki, back when we were still using it. MediaWiki really wasn't designed for user_id; and it's users were stored through usernames... thats why this was done. It has just sort of hung around since then and I haven't seen the need to change it.
The problem is... if someone tries to register that violates the format they get the following error:
Please correct the following errors: "Name in wrong format"
I would like to give them a more thorough error message. How would I do this?