用户密码支持自定义配置规则
This commit is contained in:
@ -347,6 +347,32 @@ function calSumWidth(elements) {
|
||||
return width;
|
||||
}
|
||||
|
||||
/** 密码规则范围验证 */
|
||||
function checkpwd(chrtype, password) {
|
||||
if (chrtype == 1) {
|
||||
if(!$.common.numValid(password)){
|
||||
$.modal.alertWarning("密码只能为0-9数字");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 2) {
|
||||
if(!$.common.enValid(password)){
|
||||
$.modal.alertWarning("密码只能为a-z和A-Z字母");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 3) {
|
||||
if(!$.common.enNumValid(password)){
|
||||
$.modal.alertWarning("密码必须包含字母以及数字");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 4) {
|
||||
if(!$.common.charValid(password)){
|
||||
$.modal.alertWarning("密码必须包含字母、数字、以及特殊符号-、_");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// 日志打印封装处理
|
||||
var log = {
|
||||
log: function(msg) {
|
||||
|
Reference in New Issue
Block a user