we need to check if the security password is documented correctly for an Internal Web CRM.
Is there a way to validate a given security password like a "$$$$Addy1234"
?
This password string contains 4 Special Char, 4 Alphabets and 4 Number.And Alphabets part should contain one Upper and one Lower Case Character.
The regex I tried that work with all the case but in the Alphabets, I need to get at least one Upper and one Lower Case Character.
I tried following but can't get a solution:
$("#btn_submit").click(function () {
if ($("#txt_pasword").filter(function () {
return this.value.match(/^([-\/@#!*$%^&.'_+={}()]{4})([a-zA-Z]{4})([0-9]{4})$/);
})) {
$("#txt_pasword").parent().child("span").text("pass");
} else {
$("#txt_pasword").parent().child("span").text("fail");
}
});
Please provide an idea how should I do this?
Thank you in advance.