Commit 03a854f8 by 胡悦

调整密码规则

1 parent 2acc913f
......@@ -167,7 +167,7 @@
maxlength="20"
required
lay-verify="required|merchantLoginPassword"
placeholder="必须包含字母、数字、下划线、特殊符号中3种或以上"
placeholder="8-20位,必须包含大写字母、小写字母、数字、特殊符号中3种或以上"
autocomplete="off"
class="layui-input"
/>
......@@ -564,8 +564,8 @@
return '登录密码请填入8-20位字符'
}
// if (!/^(?=.*\d)(?=.*[a-zA-Z])[\s\S]{6,20}$/.test(value)) {
if (!/^(?=(?:.*[A-Za-z])(?!.*[A-Za-z].*[A-Za-z])).*(?=(?:.*\d)(?!.*\d.*\d)).*(?=(?:.*[_\W_]).*(?!.*[_\W_].*[_\W_])).{8,20}$/.test(value)) {
return '请输入密码(8-20位,必须包含字母、数字、下划线、特殊符号中3种或以上)'
if (!/^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W_]+$)(?![a-z0-9]+$)(?![a-z\W_]+$)(?![0-9\W_]+$)[a-zA-Z0-9\W_]{8,20}$/.test(value)) {
return '请输入密码(8-20位,必须包含大写字母、小写字母、数字、特殊符号中3种或以上)'
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!