' 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
Friday, June 27, 2008
Subscribe to:
Post Comments (Atom)
1 comment:
This is an excellent library for verifying email addresses:
http://www.kellermansoftware.com/p-37-net-email-validation.aspx
Post a Comment