I have this password regex:
var PasswordRegex = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[0-9a-zA-Z!@#$&()\\-`.+,/\"]{8,}$/;
i now want the min length to be set from the admin CMS
so i have this
function CheckPassword(minLengh, Password) {
DynamicPasswordRegex = new RegExp("^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[0-9a-zA-Z!@#$&()\\-`.+,/\"]{" + minLengh + ",}$");
return DynamicPasswordRegex.test(Password);
}
for some reason, passwords that are ok, returned false