Advertisement
GlobHeal

Untitled

Jan 20th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function checkPassword() {
  2.   var pass = $("#password").val();
  3.   var confpass = $("#confirm_password").val();
  4.   console.log(pass);
  5.   console.log(confpass);
  6.   var regex = new RegExp("(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}");
  7.   if(regex.test(pass) && regex.test(confpass)){
  8.     return true;
  9.   } else {
  10.     return false;
  11.     console.log("Pass is invalid");
  12.   }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement