判断 手机号
2018-04-19 本文已影响0人
他好像一条虫
/**
* Detect whether an account is a Chinese mobile No.
* 1、手机号限制
*/
+ (BOOL)isMobileNo:(NSString *)accountName {
if([BDRUtil isEmptyStr:accountName])
{
return NO;
}
if (accountName.length==11 || accountName.length == 13) {
return [accountName isMatchedByRegex:@"1[0-9]{10}"]
|| [accountName isMatchedByRegex:@"861[0-9]{10}"];
}
return NO;
}