什么是用于在iOS 2.0中验证电子邮件地址的最佳实践? [英] What are best practices for validating email addresses in Objective-C for iOS 2.0?

查看:129
本文介绍了什么是用于在iOS 2.0中验证电子邮件地址的最佳实践?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

验证用户输入的电子邮件地址是iOS 2.0兼容的最简洁的方法是什么?

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

推荐答案

解决方案我发现到目前为止(我最后去的是一个)是添加 RegexKitLite 通过NSString类别访问正则表达式的项目。

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.

这篇关于什么是用于在iOS 2.0中验证电子邮件地址的最佳实践?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆