Commit f56c8ecc by 梁建民

js

parent 1131a069
......@@ -121,7 +121,7 @@
}
//密码长度要大于6位,由数字和字母组成
var reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,}$/;
var reg = /^[0-9A-Za-z]{6,}$/;
if (!reg.test($password.val()) && type === 1) {
......
......@@ -107,13 +107,13 @@
}
//密码长度要大于6位,由数字和字母组成
var reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,}$/;
var reg = /^[0-9A-Za-z]{6,}$/;
if (!reg.test($password.val())) {
if (!reg.test($password.val()) || $password.length < 6) {
$password.parent().parent('.input-wrap').addClass('error');
$(".error-text").show().find("span").text('密码长度要大于6位,由数字和字母组成');
$(".error-text").show().find("span").text('密码由字母和数字组成,且不能少于6位');
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment