首页 > 代码库 > ios 判断邮箱是否正确

ios 判断邮箱是否正确

 

ios 判断邮箱是否正确

  

- (BOOL)isValidateEmail:(NSString *)Email

{

    NSString *emailCheck = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}";

    NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES%@",emailCheck];

    return [emailTest evaluateWithObject:Email];

}

 

ios 判断邮箱是否正确