Keep in touch

you can keep in touch with my all blogs and sites by install this Toolbar...
http://rworldtoolbar.ourtoolbar.com/

Friday, June 27, 2008

Email validation in vb.net 2005

' Email validation
Public Function EmailValid(ByVal email As String) As Boolean
' The regular expression rule
Dim Expression As New System.Text.RegularExpressions.Regex("\S+@\S+\.\S+")
' If the email matches the regular expression
If Expression.IsMatch(email) Then
' MessageBox.Show("The email address is valid.")
Return True
Else
' MessageBox.Show("The email address is NOT valid.")
Return False
End If
End Function

1 comment:

darichkid said...

This is an excellent library for verifying email addresses:
http://www.kellermansoftware.com/p-37-net-email-validation.aspx