I currently have an email field validation that is okay, but I am looking to add in something that will verify that what has been entered ends in one of the TLDs (com, ca, info, biz, org and so on.)
I am unsure of how to implement that additional feature in to what I have:
Currently, the string only checks to see that the tld contains only a-z chars.
Thanks in advance for comments and help.
Gary
I am unsure of how to implement that additional feature in to what I have:
Code:
'Email
re.Pattern = "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"
errorArray(2) = re.Test(xemail)
if errorArray(2) then
errorArray(2) = False
else
errorArray(2) = True
ErrorMsg = ErrorMsg & "Email Address<br>"
end if
Currently, the string only checks to see that the tld contains only a-z chars.
Thanks in advance for comments and help.
Gary