/**
* 邮箱的验证
* &-email 待传入邮箱字符串
* 返回一个BOOL值:YES为验证正确
*/
* 邮箱的验证
* &-email 待传入邮箱字符串
* 返回一个BOOL值:YES为验证正确
*/
+ (BOOL)isValidateEmail:(NSString *)email;
/**
* 邮箱的验证
*/
+(BOOL)isValidateEmail:(NSString *)email{
NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}";
NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", emailRegex];
return [emailTest evaluateWithObject:email];
* 邮箱的验证
*/
+(BOOL)isValidateEmail:(NSString *)email{
NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}";
NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", emailRegex];
return [emailTest evaluateWithObject:email];
}