Commit 6d01fa34 by 胡悦

密码修改

1 parent ac74cac8

10.2 KB | W: | H:

10.3 KB | W: | H:

css/img/zTreeStandard.png
css/img/zTreeStandard.png
css/img/zTreeStandard.png
css/img/zTreeStandard.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -165,8 +165,9 @@
<div class="layui-form-item">
<label class="layui-form-label required">登录密码:</label>
<div class="layui-input-block" style="position: relative">
<input type="password" name="password" id="password" maxlength="15" required lay-verify="required|pass"
placeholder="请输入登录密码" autocomplete="off" class="layui-input" />
<input type="password" name="password" id="password" maxlength="15" required
lay-verify="required|merchantLoginPassword" placeholder="请输入登录密码" autocomplete="off"
class="layui-input" />
<button type="button" class="layui-btn form-right hide" id="resetpsw">重置密码</button>
</div>
</div>
......@@ -462,7 +463,16 @@
// 表单验证
form.verify({
pass: [/^[\S]{6,15}$/, '密码必须6-15位']
merchantLoginPassword: function (value) {
if (value) {
if (value.length < 6 || value.length > 20) {
return '登录密码请填入6-20位字符'
}
if (!/^(?=.*\d)(?=.*[a-zA-Z])[\s\S]{6,20}$/.test(value)) {
return '您输入的密码格式不正确,必须同时包含字母、数字。'
}
}
},
})
// select 选择触发
......
......@@ -676,13 +676,17 @@
},
merchantLoginPassword: function (value) {
if (value) {
if (!validator.checkPassWord(value)) {
return '您输入的密码格式不正确,密码必须同时包含字母、数字'
if (value.length < 6 || value.length > 20) {
return '登录密码请填入6-20位字符'
}
if (!/^(?=.*\d)(?=.*[a-zA-Z])[\s\S]{6,20}$/.test(value)) {
return '您输入的密码格式不正确,必须同时包含字母、数字。'
}
// if (!validator.checkPassWord(value)) {
// return '您输入的密码格式不正确,密码必须同时包含字母、数字'
// }
}
// if (value && (value.length < 6)) {
// return '登录密码请填入6-20位字符'
// }
},
residentPhone: function (value) {
if (value && !validator.checkPhoneNumber(value)) {
......
......@@ -678,8 +678,11 @@
},
merchantLoginPassword: function (value) {
if (value) {
if (!validator.checkPassWord(value)) {
return '您输入的密码格式不正确,密码必须同时包含字母、数字'
if (value.length < 6 || value.length > 20) {
return '登录密码请填入6-20位字符'
}
if (!/^(?=.*\d)(?=.*[a-zA-Z])[\s\S]{6,20}$/.test(value)) {
return '您输入的密码格式不正确,必须同时包含字母、数字。'
}
}
},
......
......@@ -673,8 +673,11 @@
},
merchantLoginPassword: function (value) {
if (value) {
if (!validator.checkPassWord(value)) {
return '您输入的密码格式不正确,密码必须同时包含字母、数字'
if (value.length < 6 || value.length > 20) {
return '登录密码请填入6-20位字符'
}
if (!/^(?=.*\d)(?=.*[a-zA-Z])[\s\S]{6,20}$/.test(value)) {
return '您输入的密码格式不正确,必须同时包含字母、数字。'
}
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!