提交 92a02909 authored 作者: shixiaochen's avatar shixiaochen

1、密码校验规则方法

上级 9409af6f
......@@ -98,3 +98,12 @@ bool checkEasyPwd(String input, String phone) {
endCharSuccessiveNum.hasMatch(input) ||
phone.contains(input);
}
/// 密码校验规则
///密码长度8-12位
///密码由数字及大小写英文字母组成
///密码中需包含至少1个大写字母+1个小写字母+1个数字
bool checkPwdRule(String pwd){
RegExp regExp = RegExp("(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[A-Za-z0-9]{8,12}");
return regExp.hasMatch(pwd);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论