email and website validation

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Mar 2007
Posts: 24
Reputation: pranavdv is an unknown quantity at this point 
Solved Threads: 0
pranavdv pranavdv is offline Offline
Newbie Poster

email and website validation

 
0
  #1
Dec 31st, 2007
how to validate email field and website field. Means, in email @ and . is compulsory
and in website www and . is compulsory, something like this
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 106
Reputation: SCBWV is an unknown quantity at this point 
Solved Threads: 16
SCBWV SCBWV is offline Offline
Junior Poster

Re: email and website validation

 
0
  #2
Dec 31st, 2007
Why not use InStr?

If InStr(Email$, "@") > 0 Then 'Valid Email Format

If UCase$(Left$(Website$, 4))="WWW." then 'valid web format

If UCase$(Left$(Website$, 11))="HTTP://WWW." then 'valid web format
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 24
Reputation: pranavdv is an unknown quantity at this point 
Solved Threads: 0
pranavdv pranavdv is offline Offline
Newbie Poster

Re: email and website validation

 
0
  #3
Jan 4th, 2008
thnx for reply.

suppose some one enter "abcd@abcd"
without entering ".com / .org / .net" then how to validate?
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 106
Reputation: SCBWV is an unknown quantity at this point 
Solved Threads: 16
SCBWV SCBWV is offline Offline
Junior Poster

Re: email and website validation

 
0
  #4
Jan 4th, 2008
Well, you'll have to check for thsoe as well. But what's to prevent someone from entering "no@way.com" as a bogus address? There's really no way to validate legitimate addresses. I would check for the presence of an @ sign and a period in the input, and assume they typed a legitimate address.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 24
Reputation: pranavdv is an unknown quantity at this point 
Solved Threads: 0
pranavdv pranavdv is offline Offline
Newbie Poster

Re: email and website validation

 
0
  #5
Jan 5th, 2008
that is ok. but,
if some does not enter .(dot) and rest part. i.e. "no@" insted of no@way.com
then how to validate? that is my problem

and by the way for @, InStr working properly
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 106
Reputation: SCBWV is an unknown quantity at this point 
Solved Threads: 16
SCBWV SCBWV is offline Offline
Junior Poster

Re: email and website validation

 
1
  #6
Jan 5th, 2008
Check for both...

If InStr(Email$, "@") > 0 AND InStr(Email$, ".") > 0 Then
'Valid Email Format
else 'not valid
end if
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 24
Reputation: pranavdv is an unknown quantity at this point 
Solved Threads: 0
pranavdv pranavdv is offline Offline
Newbie Poster

Re: email and website validation

 
0
  #7
Jan 5th, 2008
thnx for solutions
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC