diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/custmerform/lr-formrender.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/custmerform/lr-formrender.js index 0fc925c5e..22c9018d7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/custmerform/lr-formrender.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/custmerform/lr-formrender.js @@ -150,7 +150,7 @@ } } var r = { code: true, msg: '' }; - if (checkexpession == 'LenNum' || checkexpession == 'LenNumOrNull' || checkexpession == 'LenStr' || checkexpession == 'LenStrOrNull') { + if (checkexpession == 'LenNum' || checkexpession == 'LenNumOrNull' || checkexpession == 'LenStr' || checkexpession == 'LenStrOrNull' || checkexpession == 'MinLenStr') { var len = $this.attr("length"); r = checkfn(value, len); } else { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-validator-helper.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-validator-helper.js index eef668139..40305ce00 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-validator-helper.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-validator-helper.js @@ -202,6 +202,15 @@ res.msg = '必须小于等于' + n + '位字符或空'; } return res; + }, + isMinLenStr: function (obj, n) {//验证是否大于等于n位数的字符串 nchar + var res = { code: true, msg: '' }; + obj = $.trim(obj); + if (!learun.validator.isNotNull(obj).code || obj.length < n) { + res.code = false; + res.msg = '必须大于等于' + n + '位字符'; + } + return res; } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-validator.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-validator.js index 42737faf6..c18554fb1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-validator.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-validator.js @@ -88,7 +88,7 @@ // value = $this.val(); //} var r = { code: true, msg: '' }; - if (checkexpession == 'LenNum' || checkexpession == 'LenNumOrNull' || checkexpession == 'LenStr' || checkexpession == 'LenStrOrNull') { + if (checkexpession == 'LenNum' || checkexpession == 'LenNumOrNull' || checkexpession == 'LenStr' || checkexpession == 'LenStrOrNull' || checkexpession == 'MinLenStr') { var len = $this.attr("length"); r = checkfn(value, len); } else {