I have a joomla project, and would like to to know how I can increase the validation of the Password field (when registering) from at least 4 characters to atleast 6? Here is the current validation, I believe, from the validate.js
file:
this.setHandler('password',
function (value) {
regex=/^\S[\S ]{2,98}\S$/;
return regex.test(value);
}
);
That regex says "1 character, then (either a character or a space repeated 2 to 98 times), then 1 character". You'll want to increase the block in the middle from "2 to 98 times" to "4 to 98 times": /^\S[\S ]{4,98}\S$/