//判断手机号是否符合
if(![self isValidateMobile:phoneNumber])
{
@H_404_15@ UIAlertView@H_404_15@ * alert = [[UIAlertView@H_404_15@ alloc@H_404_15@]initWithTitle@H_404_15@:nil@H_404_15@ message@H_404_15@:@"请输入正确的手机号码"@H_404_15@ delegate@H_404_15@:nil@H_404_15@ cancelButtonTitle@H_404_15@:@"确定"@H_404_15@ otherButtonTitles@H_404_15@:@"取消"@H_404_15@,nil@H_404_15@];
[alert show];
return;
}
/*手机号码验证 MODIFIED BY HELENSONG*/
-(BOOL) isValidateMobile:(NSString *)mobile
{
@H_404_15@ //手机号以13, 15,18开头,八个 \d 数字字符
@H_404_15@ NSString@H_404_15@ *phoneRegex =@"^((13[0-9])|(15[^4,\\D])|(18[0,0-9]))\\d{8}$"@H_404_15@;
NSPredicate *phoneTest = [NSPredicatepredicateWithFormat:@"SELF MATCHES %@",phoneRegex];
@H_404_15@ // NSLog(@"phoneTest is %@",phoneTest);
return [phoneTest evaluateWithObject:mobile];
}