这是我们公司校验密码为8~16位数字或字符
function isValidatePassword(secretKey128) {
var matcher = new RegExp(
"^(?![0-9]+$)(?![a-zA-Z]+$)[a-zA-Z0-9!@#$%^&*_]{8,16}$"); // console.log((matcher.test(secretKey128)));
return (matcher.test(secretKey128));
}
本文介绍了一种用于校验密码强度的正则表达式方法,确保密码由8至16位的数字、字母及特殊字符组合而成,有效提升账户安全性。
这是我们公司校验密码为8~16位数字或字符
function isValidatePassword(secretKey128) {
var matcher = new RegExp(
"^(?![0-9]+$)(?![a-zA-Z]+$)[a-zA-Z0-9!@#$%^&*_]{8,16}$"); // console.log((matcher.test(secretKey128)));
return (matcher.test(secretKey128));
}

被折叠的 条评论
为什么被折叠?