|
@@ -18,8 +18,6 @@ import org.springframework.stereotype.Service;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
-import java.util.regex.Matcher;
|
|
|
-import java.util.regex.Pattern;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Service("JobUserService")
|
|
@@ -566,17 +564,14 @@ public class JobUserServiceImpl implements JobUserService {
|
|
|
|
|
|
//验证手机号是否合法
|
|
|
private boolean userMobileIsValid(String mobile) {
|
|
|
- // 中国手机号码长度为11位,且符合以下格式:13x, 14x, 15x, 17x, 18x
|
|
|
-// String mobile_Regex = "^(13[0-9]|14[57]|15[0-35-9]|17[0-9]|18[0-9])\\d{8}$";
|
|
|
- String mobile_Regex = "0?(13|14|15|16|18|17|19)[0-9]{9}";
|
|
|
+ //String mobile_Regex = "0?(13|14|15|16|18|17|19)[0-9]{9}";
|
|
|
+ String mobile_Regex = "^1[3|4|5|6|7|8|9]\\d{9}$";
|
|
|
return mobile.matches(mobile_Regex);
|
|
|
}
|
|
|
|
|
|
private boolean userEmailIsValid(String email){
|
|
|
- String email_Regex = "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
|
|
|
- Pattern pattern = Pattern.compile(email_Regex);
|
|
|
- Matcher matcher = pattern.matcher(email);
|
|
|
- return matcher.matches();
|
|
|
+ String email_Regex = "^[a-z0-9]+([._\\\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$";
|
|
|
+ return email.matches(email_Regex);
|
|
|
}
|
|
|
|
|
|
@Override
|