Compare commits

..

No commits in common. "Bug587-ZhiWeiXiang" and "master" have entirely different histories.

2 changed files with 0 additions and 18 deletions

View File

@ -1,14 +0,0 @@
function containsDigitsLettersSpecialCharacters(s) {
let resultD = 0, resultL = 0, resultS = 0;
// Digit test
resultD = /\d/.test(s);
// Letter test
resultL = /[a-zA-Z]/.test(s);
// Special character test
resultS = /[!@#$%^&*(),.?":{}|<>]/.test(s);
return resultD + resultL + resultS == 3;
}

View File

@ -24,10 +24,6 @@ You're logged in already! <a href="/logout">Logout</a>.
alert('密码过于简单。(密码长度至少4位)');
return false;
}
if (!containsDigitsLettersSpecialCharacters(password)) {
alert('密码过于简单。(密码要包括数字,字母,特殊符号)');
return false;
}
$.post("/signup", {'username': username, 'password': password},
function (response) {
if (response.status === '0') {