在iOS 2.0上验证电子邮件地址的最佳做法是什么 [英] What are best practices for validating email addresses on iOS 2.0

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

问题描述

验证用户在iOS 2.0上输入的电子邮件地址的最干净方法是什么?

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

注意:这是一个历史性问题特定于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.

推荐答案

到目前为止,我找到的最好的解决方案(以及最终得到的解决方案)是添加 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天全站免登陆