Registration Form Password Validation Broken

13 years 5 months ago #59810 by soopagroove
Strange... I already posted this, but it disappeared... deleted by moderator for some reason???

Joomla: 1.5.1
CB: 1.1
Browser: Firefox
OS: MacOS 10.4.11

Reproduction Steps:
1) Install CB 1.1 on Joomla 1.5.1
2) Configure to use CB user registration
3) Browse to new user registration form on site
5) Fill out registration form and enter a valid password starting with a number: 1234abcd
6) Click 'Send Registration' button

Validation error message pops up indicating that the password is invalid, even though the password is actually a valid password.

Please Log in to join the conversation.

13 years 5 months ago #60559 by mgercken
I am having this same issue. Have you found a solution to it?

Please Log in to join the conversation.

13 years 5 months ago #60561 by nant
Original post is a duplicate - I should have deleted it to remove further inquires.

Answer given to duplicate post here:,com_joomlaboard/Itemid,38/func,view/catid,43/id,59788/

Please Log in to join the conversation.

12 years 11 months ago #77954 by mgercken
For those folks not able to move to CB 1.2 in the near future, the following is a potential fix to the problem of not allowing a numeral as the first character of the password:

if you look at /components/com_comprofiler/comprofiler.html.php. There are two occurrences where a regular expression is used to validate the password (there is a third for the username which you should ignore). You can easily find the two occurrences by searching for "checkJversion". The first two occurrences that are found are the ones to change. The third one that you find is related to the username and is in a javascript function called "cbSendUsernameCheck".

The expression that is broken is as follows:
var r = new RegExp("^[a-zA-Z](([\.\-a-zA-Z0-9@])?[a-zA-Z0-9]*)*$", "i"«»);

To allow a 0-9 to be entered at the beginning of the password, change the line of code to this:
var r = new RegExp("^[a-zA-Z0-9](([\.\-a-zA-Z0-9@])?[a-zA-Z0-9]*)*$", "i"«»);

If you google "regular expressions php", you can identify ways to modify this expression further to allow other characters like !, #, $, etc.

Another thing to note is that you might want to change the error message string that is displayed when the user enters an invalid password.

This can be done by modifying the file /components/com_comprofiler/plugin/language/default_language/default_language.php. Search for the keyword "_VALID_AZ09".

Please Log in to join the conversation.

12 years 3 months ago #101501 by viper_iii
Replied by viper_iii on topic Re:Registration Form Password Validation Broken
This problem still exists in 1.2.1 at least in my 1.2.1

logged into the back end as super admin and have the field set to no-validation.

min length 5 chars.

won't take 5 digit number...

Please Log in to join the conversation.

12 years 3 months ago #101506 by Rapunzl
CB 1.2 is hard-coded to take no less than 6-character passwords. You can change it to require more, but not less.

Jamie (Rapunzl)
Community Builder Team Member

Before posting on forums: Read all CB Articles | Specially the FAQ | Help us help you
CB links: Subscribe to CB documentation | [url=
]Our templates[/url] | [url=
]Paid Subscriptions[/url] | Get Hosting | Our Forge
Visit my CB Profile

My personal site Rapunzl's Reality always under reconstruction

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.162 seconds

Facebook Twitter LinkedIn