Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkPassword() {
- var pass = $("#password").val();
- var confpass = $("#confirm_password").val();
- console.log(pass);
- console.log(confpass);
- var regex = new RegExp("(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}");
- if(regex.test(pass) && regex.test(confpass)){
- return true;
- } else {
- return false;
- console.log("Pass is invalid");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement