utils/password.js
A module for ac-bundle-app, published by ac-bundle-module.
Available Methods: test, medium, strong
test
function(password, level) {
if (typeof level === "undefined") level = "medium";
return mod[level]().test(password);
}
medium
function() {
return new RegExp("^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})");
}
strong
function() {
return new RegExp("^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})");
}
Happy Coding!