Skip to content

Commit

Permalink
修复手机号码验证没有包含最新号码段的问题
Browse files Browse the repository at this point in the history
修复手机号码验证没有包含最新号码段的问题
  • Loading branch information
LiqiNew committed Sep 9, 2018
1 parent 18058fe commit fa03a06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ allprojects {
```
**2:依赖MyUtils**<br>
```gradle
compile 'com.github.liqinew:myutils:V.1.1.2'
compile 'com.github.liqinew:myutils:V.1.1.3'
```

### [点击查阅MyUtils-API文档](https://liqinew.github.io/MyUtils/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ public void onClick(View v) {
* 手机验证
*
*/
boolean matchMobile = Validation.matchMobile("19999999999");
Toast.makeText(TestOtherActivity.this, "double类型12.123转换值:" + doubleToInt + "\n19999999999手机号码验证结果:" + matchMobile, Toast.LENGTH_SHORT).show();
boolean matchMobile = Validation.matchMobile("16699999999");
Toast.makeText(TestOtherActivity.this, "double类型12.123转换值:" + doubleToInt + "\n16699999999手机号码验证结果:" + matchMobile, Toast.LENGTH_SHORT).show();
}
});

Expand Down
2 changes: 1 addition & 1 deletion utils/src/main/java/com/liqi/utils/Validation.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public static boolean isZipNO(String zipString) {
* @return true是符合,false为不符合。
*/
public static boolean matchMobile(String mobile) {
String mobileregex = "^(13[0-9]|14[0-9]|15[0-9]|17[0-9]|18[0-9])\\d{8}$";
String mobileregex = "^(13[0-9]|14[0-9]|15[0-9]|17[0-9]|18[0-9]|16[0-9])\\d{8}$";
return match(mobileregex, mobile);
}

Expand Down

0 comments on commit fa03a06

Please sign in to comment.