密码规则修改

nanfang_branch
wangxh 5 years ago
parent 6cc7d59753
commit 58043a458f

@ -28,10 +28,10 @@
height: 59px!important;
}
.row-fluid{
overflow-y: hidden
overflow-y: hidden;
}
</style>
<body class="hold-transition skin-blue sidebar-mini">
<body class="hold-transition skin-blue sidebar-mini" scroll="no">
<input type="hidden" id="userId" value="${CURRENT_USER.userId}">
<input type="hidden" id="webSocketUrl" value="${WEBSOCKET_URLHEAD}">
<input type="hidden" id="strSplit" value="${STR_SPLIT}">

@ -11,31 +11,31 @@ $(function() {
//提交更改
$('#btn_submit').click(function () {
if($("#userPwd").val() == ""){
/*if($("#userPwd").val() == ""){
toastr.warning("旧密码不能为空!")
return false;
}
if($("#userPwd").val().length < 6){
toastr.warning("旧密码长度小于6位!")
if($("#userPwd").val().length < 8){
toastr.warning("旧密码长度小于8位!")
return false;
}
}*/
if($("#newUserPwd").val() == ""){
toastr.warning("新密码不能为空!")
return false;
}
if($("#newUserPwd").val().length < 6){
toastr.warning("新密码长度小于6位!")
if($("#newUserPwd").val().length < 8){
toastr.warning("新密码长度小于8位!")
return false;
}
if($("#newReUserPwd").val() == ""){
toastr.warning("重复密码不能为空!")
return false;
}
if($("#newReUserPwd").val().length < 6){
toastr.warning("重复密码长度小于6位!")
if($("#newReUserPwd").val().length < 8){
toastr.warning("重复密码长度小于8位!")
return false;
}
reg=/^(?=.*[a-z])(?=.*\d)[a-zA-Z\d]{6,}$/;
reg=/^(?=.*[a-z])(?=.*\d)[a-zA-Z\d]{8,}$/;
if (!reg.test($("#newUserPwd").val())) {
toastr.warning("密码格式必须包含数字和字母!")
return false;

@ -28,10 +28,10 @@
height: 59px!important;
}
.row-fluid{
overflow-y: hidden
overflow-y: hidden;
}
</style>
<body class="hold-transition skin-blue sidebar-mini">
<body class="hold-transition skin-blue sidebar-mini" scroll="no">
<input type="hidden" id="userId" value="${CURRENT_USER.userId}">
<input type="hidden" id="webSocketUrl" value="${WEBSOCKET_URLHEAD}">
<input type="hidden" id="strSplit" value="${STR_SPLIT}">

@ -11,31 +11,31 @@ $(function() {
//提交更改
$('#btn_submit').click(function () {
if($("#userPwd").val() == ""){
/*if($("#userPwd").val() == ""){
toastr.warning("旧密码不能为空!")
return false;
}
if($("#userPwd").val().length < 6){
toastr.warning("旧密码长度小于6位!")
if($("#userPwd").val().length < 8){
toastr.warning("旧密码长度小于8位!")
return false;
}
}*/
if($("#newUserPwd").val() == ""){
toastr.warning("新密码不能为空!")
return false;
}
if($("#newUserPwd").val().length < 6){
toastr.warning("新密码长度小于6位!")
if($("#newUserPwd").val().length < 8){
toastr.warning("新密码长度小于8位!")
return false;
}
if($("#newReUserPwd").val() == ""){
toastr.warning("重复密码不能为空!")
return false;
}
if($("#newReUserPwd").val().length < 6){
toastr.warning("重复密码长度小于6位!")
if($("#newReUserPwd").val().length < 8){
toastr.warning("重复密码长度小于8位!")
return false;
}
reg=/^(?=.*[a-z])(?=.*\d)[a-zA-Z\d]{6,}$/;
reg=/^(?=.*[a-z])(?=.*\d)[a-zA-Z\d]{8,}$/;
if (!reg.test($("#newUserPwd").val())) {
toastr.warning("密码格式必须包含数字和字母!")
return false;

Loading…
Cancel
Save