|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Email validation in gridHi
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("t***@test.com")) Method by Carl Franklin http://www.franklins.net/dotnet/MailChecker.zip Ken ------------ Show quoteHide quote "John" <John@nospam.infovis.co.uk> wrote in message news:eRAn68iQGHA.1160@TK2MSFTNGP09.phx.gbl... > 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 >
"VB (9) Rocks" slide show
VB.Net 2005 Treeview example required ADO With SQL Transactions Progressbar and treeview stops refreshing Optimizing Repeated PictureBox.Paints padding text field with blank in MS Access vs OLEDB Jet 4.0 Getting icon from form in dynamically loaded DLL Parsing XML strings control collection VB doesn't allow temp tables in Stored Procedures? |
|||||||||||||||||||||||