完成大作业服务端代码,新建管理端,管理端不可用
This commit is contained in:
15
Project/Service/static/js/checkInfo.js
Normal file
15
Project/Service/static/js/checkInfo.js
Normal file
@@ -0,0 +1,15 @@
|
||||
var checkInfo = {};
|
||||
|
||||
checkInfo.checkMobileNo = function() {
|
||||
let mobileNo = document.getElementById('mobileNo').value;
|
||||
let regexMobileNo = /^1[3-9]\d{9}$/;
|
||||
return regexMobileNo.test(mobileNo);
|
||||
}
|
||||
|
||||
checkInfo.checkPassword = function() {
|
||||
let password = document.getElementById('password').value;
|
||||
let regexPassword = /^[A-Za-z0-9\W_]{6,20}$/;
|
||||
let isValidPassword = regexPassword.test(password);
|
||||
let confirmPassword = document.getElementById('confirmPassword').value;
|
||||
return isValidPassword && (password === confirmPassword);
|
||||
}
|
||||
Reference in New Issue
Block a user