• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Name in wrong format (where to edit phrase)

Jaxel

Well-known member
#1
I have some obscure rules to my username registration...

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?
 

Kier

XenForo Developer
Staff member
#2
All of that is handled through XenForo_DataWriter_User->_verifyUsername(), though I've not been able to find the text you mentioned at all. The error message I see is

"Please enter another name. The entered value does not match the required format."

(phrase: please_enter_another_name_required_format)