VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



ValidateEmail

by Chris Priest (1 Submission)
Category: Internet/HTML
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (39 Votes)

Provides the user with a means of validating an email address. Using the like keyword, checks the email address with a specific pattern and will pick up on invalid chars for example, [email protected] will return false as would john.doe@com.

Inputs
strEmail - Email address that needs to be checked
Assumes
The like statement allows pattern matching against the email address. Like "*@[a-z,0-9]*.*" This would allow anything before the @ sign, and the first letter after the @ sign must be either a number of letter and somewhere after that there must be at least one full stop
Code Returns
Boolean value indicating if email address is valid

Rate ValidateEmail

Public Function ValidateEmail(strEmail As String) As Boolean
 
ValidateEmail = strEmail Like "*@[A-Z,a-z,0-9]*.*"
 
End Function

Download this snippet    Add to My Saved Code

ValidateEmail Comments

No comments have been posted about ValidateEmail. Why not be the first to post a comment about ValidateEmail.

Post your comment

Subject:
Message:
0/1000 characters