Compare commits
No commits in common. "92331ca7a09dbdc4bd907115c073d0e69621a272" and "fe1d4c29ffa8c2ef4419d5299863edac5ef4a762" have entirely different histories.
92331ca7a0
...
fe1d4c29ff
|
@ -21,27 +21,6 @@
|
|||
slider.init(); // 初始化滑块解锁功能
|
||||
});
|
||||
|
||||
function containsDigitsLettersSpecialCharacters(s) {
|
||||
let resultD = 0, resultL = 0, resultS = 0;
|
||||
|
||||
// Digit test
|
||||
'0123456789'.split('').forEach((x) => {
|
||||
if (s.includes(x))
|
||||
resultD = 1;
|
||||
});
|
||||
|
||||
// Letter test
|
||||
resultL = /[a-z]/i.test(s);
|
||||
|
||||
// Special charater test
|
||||
'+-*/,.:;/\[]<>$%&()!?^~'.split('').forEach((x) => {
|
||||
if (s.includes(x))
|
||||
resultS = 1;
|
||||
});
|
||||
|
||||
return resultD + resultL + resultS == 3;
|
||||
}
|
||||
|
||||
function signup(){
|
||||
// 发起 AJAX 请求来处理注册
|
||||
username = $("#username").val().trim();
|
||||
|
@ -65,10 +44,6 @@
|
|||
alert('密码过于简单。(密码长度至少4位)');
|
||||
return false;
|
||||
}
|
||||
if (!containsDigitsLettersSpecialCharacters(password)) {
|
||||
alert('密码过于简单。(密码要包括数字,字母,特殊符号)');
|
||||
return false;
|
||||
}
|
||||
is_ok = slider.getIsOk();
|
||||
if(!is_ok){
|
||||
alert('没有滑动验证');
|
||||
|
|
Loading…
Reference in New Issue