This topic is locked
[SOLVED]

 Password validation in "change password page"

5/27/2011 5:56:42 AM
PHPRunner General questions
A
aclhkaclhk author

I try to add password validation to javascript onload events in change password page. I get failure.

Here is my code :
var ctrl = Runner.getControl(pageid, 'newpassword');
ctrl.addValidation({
regex: "[0-9]{4,10}",
message: "The field should be a number from 0 to 9 and 4 to 10 digits",
messagetype: "Text"
});

J
Jane 5/30/2011

Hi,
unfortunately this code won't work on the 'change password' page because there is no JavaScript object on this page.

As workaround you can turn on Restrict weak passwords option on theUser login settings dialog, then open and edit checkpassword() function in the generated include/commonfunctions.php file manually.