0

I am creating an application wherein I need to verify correct email format, for which I am using Regexkitlite. Although I works fine, but on spending some time on Google I learnt that it is no longer accepted on AppStore.

If this is so, what else can be used which is acceptable on AppStore?

halfer
  • 19,824
  • 17
  • 99
  • 186
Nitish
  • 13,845
  • 28
  • 135
  • 263

1 Answers1

3

I have used this in lots of apps that are currently on the app store.

    NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"; 
    NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", emailRegex];

    if([emailTest evaluateWithObject:email])
    {
         //email valid
    }
    else
    {
        //email not valid
    }
halfer
  • 19,824
  • 17
  • 99
  • 186
Bani Uppal
  • 866
  • 9
  • 17