Email validation in grid

  • Thread starter Thread starter John
  • Start date Start date
J

John

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
 
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("(e-mail address removed)"))


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

Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Email Bounce Error 3
VB6 Component Issue with TDBGRID 0
Outlook Bypass Validation of E-Mails - Outlook 2016 0
verify email availability 3
Hotmail Email forwarding 15
Data Grid thru Data Source 3
Unsolicited Emails 12
Raising an Event 3

Back
Top