+(BOOL)validateWithMobile:(NSString *)mobile
{
NSString * phone =@"^1([3-9]\\d{9}$)";
NSPredicate *phoneTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",phone];
return[phoneTest evaluateWithObject:mobile];
}
+(BOOL)validateWithMobile:(NSString *)mobile
{
NSString * phone =@"^1([3-9]\\d{9}$)";
NSPredicate *phoneTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",phone];
return[phoneTest evaluateWithObject:mobile];
}
本文标题:(IOS)判断手机格式
本文链接:https://www.haomeiwen.com/subject/ssfklqtx.html
网友评论