public class PasswordValidator { private Pattern pattern; private Matcher matcher; /* (?=.*\d) #必须包含一个从0 - 9数字吗 (?=.*[a-z]) # 必须包含一个小写字母
public class UsernameValidator {private Pattern pattern;private Matcher matcher;private static final String USERNAME_PATTERN ="^[a-z0-9_-][3,15]$";public UsernameValidator(){pattern = Pattern.compile(
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号