NSString *phonePattern = @"^[1][3-8]+\\d{9}$";
//定义正则表达式
NSRegularExpression *phoneExpression = [NSRegularExpression regularExpressionWithPattern:phonePattern options:0 error:nil];
//使用正则表达式匹配字符
NSTextCheckingResult *isMatch = [phoneExpression firstMatchInString:textField.text options:0 range:NSMakeRange(0, textField.text.length)];
if(!isMatch)
{
[LoadingView showInFromView:self.view andOnlyTitle:@"请输入正确的手机号码" Disappear:YES andAnimation:2.0f];
hasError = YES;
}