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"
});