电子邮件验证(.com,.net,.org等) [英] Email Validation for (.com, .net, .org etc)

查看:95
本文介绍了电子邮件验证(.com,.net,.org等)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Windows应用程序中,我想对(.com .net .org等)进行电子邮件ID验证.
例如:myexample@gmail.com
在对".com"的验证中,如果有人错误地写了".con",那么他们应该会收到弹出消息.

那么谁能解决这个问题?

In my windows application i want to do email id validation for (.com .net .org etc..)
e.g: myexample@gmail.com
in that validation for ".com" if any person write by mistake ".con" then they should get popup message.

So can anyone solved this problem?

推荐答案

为什么?那将枚举您可能无法枚举的东西. FAR的命名空间比您列出的要多,并且您也没有考虑到国家/地区特定的后缀.

换句话说,这是一个糟糕的主意.

更好的方法是两次询问电子邮件地址并进行比较.然后,输入后,向用户发送一封确认电子邮件,其中包含一个链接,可单击该链接返回您的系统以确认该电子邮件地址有效.
Why? That would be enumerating something you can''t possibly enumerate. There are FAR more namespaces than the ones you''re listing and you''re not taking into account country specific postfixes either.

In other words, this is a BAD idea.

A better one would be to ask for the email address twice and compare them. Then, once entered, send the user a confirmation email with a link to click back into your system to confirm that the email address is valid.


这篇关于电子邮件验证(.com,.net,.org等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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