邮箱检查

    NSString * regexPassword = @"^.{6,}$";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regexPassword];
    if (![predicate evaluateWithObject:self.password.text]||![predicate evaluateWithObject:self.againPassWord.text]||![predicate evaluateWithObject:self.recentPassWord.text]) {
        [self alertWithTitle:@"密码格式不正确,最少为6" message:@""];
        return NO;
    }

原文地址:https://www.cnblogs.com/qiqibo/p/2791106.html