Commit 63b24814 by 唐功亮

【修改】 用户名正则

parent 4a7781be
......@@ -53,11 +53,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
private RedisTemplate<String,String> redisTemplate;
public static void main(String[] args) {
RedisTemplate<String, String> redisTemplate = new RedisTemplate<>();
}
@Override
public PageUtils queryPage(Map<String, Object> params) {
......@@ -286,7 +281,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
//用户名校验
public boolean checkUserName(String logname) {
String t1 = "^[0-9A-Za-z]{2,8}$"; //判断密码用户名和密码是否为数字,字母(数字或字母)
String t2 = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{2,10}$";//(数字和字母)
//String t2 = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{2,10}$";//(数字和字母)
String t2 = "^(?!\\d+$)[\\da-zA-Z]{2,8}$";//(数字和字母 不能是纯数字)
if (logname.matches(t2)) {
return logname.matches(t2);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment