Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-01-2003, 09:43 PM   PM User | #1
Crash1hd
Regular Coder

 
Join Date: Jul 2002
Location: 51° 03' -78" N -114° 05' 72" W
Posts: 617
Thanks: 0
Thanked 0 Times in 0 Posts
Crash1hd is an unknown quantity at this point
Email Validation

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 email@email.com where the first word is the same as the second word? another example is word@word.com
Crash1hd is offline   Reply With Quote
Old 10-01-2003, 10:06 PM   PM User | #2
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
http://regexlib.com/REDetails.aspx?regexp_id=284

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:

Code:
<%
Function SameMail_Domain(strAddress)
	Dim aryMail
	aryMail=Split(strAddress, "@")
	If aryMail(0)=Mid(aryMail(1),1,InstrRev(aryMail(1),".")-1) Then
		SameMail_Domain=True
	Else
		SameMail_Domain=False
	End If
End Function
%>

<% If SameMail_Domain("blah@blah.com") Then %>
	<p>The e-mail is the same!</p>
<% End If %>
__________________
OracleGuy
oracleguy is offline   Reply With Quote
Old 10-01-2003, 10:15 PM   PM User | #3
CrzySdrs
Regular Coder

 
Join Date: Jun 2003
Location: Silicon Forest
Posts: 155
Thanks: 0
Thanked 5 Times in 5 Posts
CrzySdrs is an unknown quantity at this point
I think this is Whammys stuff, but it really shows off regular expressions really well.

http://www.solidscripts.com/downloads/functions.txt

(This is whammys stuff, I only post it as a matter of reference)
__________________
Whats the point of a signature?
CrzySdrs is offline   Reply With Quote
Old 10-02-2003, 01:59 AM   PM User | #4
Crash1hd
Regular Coder

 
Join Date: Jul 2002
Location: 51° 03' -78" N -114° 05' 72" W
Posts: 617
Thanks: 0
Thanked 0 Times in 0 Posts
Crash1hd is an unknown quantity at this point
Thankyou both for the information, I am sure wammy wont mind very helpfull for sure!
Crash1hd is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:49 AM.


Advertisement
Log in to turn off these ads.