Merge remote-tracking branch 'origin/master'

This commit is contained in:
liuwu 2024-02-21 09:51:35 +08:00
commit f83959de93
5 changed files with 17 additions and 6 deletions

View File

@ -5,6 +5,11 @@ $(document).ready(function(){
form.submit();
}
});
//密码校验 密码必须是数字、字母和特殊字符的组合长度至少为8位
jQuery.validator.addMethod("isPassword", function (value, element) {
var isPassword = /^(?=.*[a-z])(?=.*\d)(?=.*[@$!%*#?&]){8,}/;
return this.optional(element) || (isPassword.test(value));
}, "密码必须是数字、字母和特殊字符的组合长度至少为8位");
//手机号码验证身份证正则合并:(^\d{15}$)|(^\d{17}([0-9]|X)$)
jQuery.validator.addMethod("isPhone",function(value,element){
var length = value.length;

View File

@ -50,7 +50,8 @@ function validateRule() {
required: true
},
password: {
required: true
required: true,
isPassword:true
}
},
messages: {

View File

@ -37,6 +37,7 @@
<h4 class="no-margins" style="font-size: 22px">请登录:业务绩效考核系统</h4>
<input class="form-control uname" name="username" placeholder="用户名" type="text" value=""/>
<input class="form-control pword" name="password" placeholder="密码" type="password" value=""/>
<div style="margin-top: 10px">温馨提示密码必须是数字、字母和特殊字符的组合长度至少为8位</div>
<div class="row m-t" th:if="${captchaEnabled==true}">
<div class="col-xs-6">
<input class="form-control code" maxlength="5" name="validateCode" placeholder="验证码"
@ -66,5 +67,6 @@
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.7.7}"></script>
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
<script src="../static/ajax/libs/validate/jquery.validate.extend.js" th:src="@{/ajax/libs/validate/jquery.validate.extend.js}"></script>
</body>
</html>

View File

@ -193,7 +193,8 @@
},
password:{
minlength: 5,
maxlength: 20
maxlength: 20,
isPassword:true,
},
email:{
email:true,

View File

@ -51,6 +51,7 @@
rules:{
oldPassword:{
required:true,
isPassword:true,
remote: {
url: ctx + "system/user/profile/checkPassword",
type: "get",
@ -64,6 +65,7 @@
},
newPassword: {
required: true,
isPassword:true,
minlength: 5,
maxlength: 20
},