NSString *regex =@"^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$";
NSPredicate *pred = [NSPredicatepredicateWithFormat:@"SELF MATCHES %@", regex];
BOOL isMatch = [pred evaluateWithObject:str];
if (!isMatch) {
UIAlertView* alert = [[UIAlertViewalloc] initWithTitle:@"提示"message:@"请输入正确的电话号码"delegate:nilcancelButtonTitle:@"OK"otherButtonTitles:nil,nil];
[alertshow];
return ;
}