Created
October 26, 2012 06:34
-
-
Save boboboa32/3957243 to your computer and use it in GitHub Desktop.
validateEmail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)validateEmail:(id *)value error:(NSError **)error { | |
if (self.email && ![self.email isValidEmailAddress] && error) { | |
*error = [NSError errorWithDomain:@"MyErrorDomain" code:1]; | |
return NO; | |
} | |
return YES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment