Search code examples
cocoa-touchemail-validationiphone-sdk-2

What are best practices for validating email addresses on iOS 2.0


What is the cleanest way to validate an email address that a user enters on iOS 2.0?

NOTE: This is a historical question that is specific to iOS 2.0 and due to its age and how many other questions are linked to it it cannot be retired and MUST NOT be changed to a "modern" question.


Solution

  • The best solution I have found so far (and the one I ended up going with) is to add RegexKitLite To the project which gives access to regular expressions via NSString Categories.

    It is quite painless to add to the project and once in place, any of the regular expression email validation logic will work.