开发者

Email Validation based on domain

I want to know in COCOA, how can we validate email based on domain. For example, if i need that e开发者_如何学Gomail address entered on text field should be from apple.com (ex: abc@apple.com) only, means if anyone enter gmail.com (ex : abc@gmail.com), so it should be invalid email address.

Thanks.


NSString *email;
if (! [[email lowercaseString] hasSuffix:@"apple.com"]) {
    // show error
}


Try a text entry field with a label next to it saying @apple.com

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜