View Full Version : Email Validation
10-01-2003, 09:43 PM
I was wondering if anyone knows of a good server side email validation useing asp that does all the normal checks i.e. @ the .com but also checks when people put something like firstname.lastname@example.org where the first word is the same as the second word? another example is email@example.com
10-01-2003, 10:06 PM
This regular expression would work pretty good. I can build it into a function if you are unfamiliar with regexp.
As for making sure the mailbox and the domain aren't the same, I think writing a thing in asp would be the easiest.
You could do something like:
If aryMail(0)=Mid(aryMail(1),1,InstrRev(aryMail(1),".")-1) Then
<% If SameMail_Domain("firstname.lastname@example.org") Then %>
<p>The e-mail is the same!</p>
<% End If %>
10-01-2003, 10:15 PM
I think this is Whammys stuff, but it really shows off regular expressions really well.
(This is whammys stuff, I only post it as a matter of reference)
10-02-2003, 01:59 AM
Thankyou both for the information, I am sure wammy wont mind very helpfull for sure! :thumbsup:
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.