Return to Snippet

Revision: 37412
at December 9, 2010 20:06 by vaishnavi


Initial Code
- (BOOL) validateEmail: (NSString *) emailstring {
    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:emailstring];
}

Initial URL

                                

Initial Description

                                

Initial Title
email address validation in objective c

Initial Tags
email

Initial Language
Objective C