Skip to content

Instantly share code, notes, and snippets.

@ken-muturi
Created January 13, 2016 15:22
Show Gist options
  • Save ken-muturi/dbddf5f812db20584d22 to your computer and use it in GitHub Desktop.
Save ken-muturi/dbddf5f812db20584d22 to your computer and use it in GitHub Desktop.
function validatePassword(password){
var re = /^(?=.*[A-Z])[A-Za-z\d$@$!%*#?&^()-_+=`~|]{8,}$/;
if(re.test(password)){
return true;
}else{
return false;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment