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

查看:30
本文介绍了在 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 Categories 访问正则表达式的项目.

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天全站免登陆