手机注册-修改账号密码验证规则

master
“用lww 5 years ago
parent ba506916d0
commit 8076110f31

@ -97,7 +97,7 @@
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
<input id="phonepassword" type="password" placeholder="请输入6-12位字母组合密码" value="">
<input id="phonepassword" type="password" placeholder="请输入6-12位密码" value="">
</div>
<div class="formitem" style="border: 0px;">
<div class="formitem" style="margin-right: .2rem;margin-top: 0px;width: 3.5rem;">
@ -135,11 +135,11 @@
</div>
<div class="formitem" style="margin-top: 0px;">
<img src="__IMG__/ssg/login/user.png">
<input id="regaccount" type="text" placeholder="请输入账号(6-12位字母数字组合)" value="">
<input id="regaccount" type="text" placeholder="请输入账号(6-15位字母数字组合)" value="">
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
<input id="regpassword" type="password" placeholder="请输入6-12位字母组合密码" value="">
<input id="regpassword" type="password" placeholder="请输入6-12位密码" value="">
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
@ -267,15 +267,15 @@ var PhoneObj = {
},
checkPassword(password){
console.log(password);
if(password.length < 6 || password.length > 15){
alert('密码长度6-15个字符');
return false;
}
var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');
if (!pwdRegex.test(password)) {
alert("您的密码复杂度太低(密码中必须包含字母、数字)!");
if(password.length < 6 || password.length > 12){
alert('密码长度6-12个字符');
return false;
}
// var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');
// if (!pwdRegex.test(password)) {
// alert("您的密码复杂度太低(密码中必须包含字母、数字)!");
// return false;
// }
var chinaRex = new RegExp("[\\u4E00-\\u9FFF]+","g");;
if (chinaRex.test(password)) {
alert("密码不允许含有中文字符!");
@ -435,12 +435,12 @@ var PhoneObj = {
var regpassword2 = $("#regpassword2").val();
var promoteId = $("#promote_id").val();
var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');
if(account.length < 6 || account.length > 12){
alert('账号长度必须是6-12位');
if(account.length < 6 || account.length > 15){
alert('账号长度必须是6-15位');
return false;
}
if (!pwdRegex.test(account)) {
alert("账号必须是6-12位字母数字组合!");
alert("账号必须是6-15位字母数字组合!");
return false;
}
if(!PhoneObj.checkPassword(regpassword)){

Loading…
Cancel
Save