all groups > vb.net controls > march 2006 >
You're in the

vb.net controls

group:

Email validation in grid


Re: Email validation in grid Ken Tucker [MVP]
3/7/2006 7:14:21 PM
vb.net controls: Hi,

I would use a regular express to check if you have a valid email

Dim regEmail As New
System.Text.RegularExpressions.Regex("^((?:(?:(?:[a-zA-Z0-9][\.\-\+_]?)*)[a-zA-Z0-9])+)\@((?:(?:(?:[a-zA-Z0-9][\.\-_]?){0,62})[a-zA-Z0-9])+)\.([a-zA-Z0-9]{2,6})$")
Trace.WriteLine(regEmail.IsMatch("test.com"))
Trace.WriteLine(regEmail.IsMatch("test@test.com"))


Method by Carl Franklin
http://www.franklins.net/dotnet/MailChecker.zip

Ken
------------
[quoted text, click to view]

Email validation in grid John
3/7/2006 9:37:09 PM
Hi

Is there anyway to validate an email address when typed in a field in grid
to stop people from entering invalid email addresses? Is there a way to do a
reverse dns lookup as well?

Thanks

Regards

AddThis Social Bookmark Button