VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Email Id Validation

by Prashant Patel (1 Submission)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 10th June 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Email Id Validation

API Declarations


' Call this function at the lost focus of the emailid textbox for prompt checking of the

Rate Email Id Validation



    Dim a As Integer
    Dim arr(23, 0) As String
    Dim i As Integer
    arr(0, 0) = "`"
    arr(1, 0) = "~"
    arr(2, 0) = "!"
    arr(3, 0) = "#"
    arr(4, 0) = "%"
    arr(5, 0) = "^"
    arr(6, 0) = "&"
    arr(7, 0) = "*"
    arr(8, 0) = "("
    arr(9, 0) = ")"
    arr(10, 0) = "{"
    arr(11, 0) = "}"
    arr(12, 0) = "["
    arr(13, 0) = "]"
    arr(14, 0) = ":"
    arr(15, 0) = ";"
    arr(16, 0) = "'"
    arr(17, 0) = "'"
    arr(18, 0) = "<"
    arr(19, 0) = ">"
    arr(20, 0) = ","
    arr(21, 0) = "?"
    arr(22, 0) = "/"
    arr(23, 0) = "\"
    
    If Email Like "*@*.???" Or _
         Email Like "*@*.??.??" Or _
         Email Like "*@*.???.??" Then EmailOK = True
    For a = 0 To 23
        i = InStr(1, txtEmailId, arr(a, 0))
        If i <> 0 Then
        EmailOK = False
        End If
    Next a
    If Email Like "*@*@*.???" Or Email Like "*@.???" Then EmailOK = False
End Function

Download this snippet    Add to My Saved Code

Email Id Validation Comments

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

Post your comment

Subject:
Message:
0/1000 characters