User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 401,620 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,735 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 958 | Replies: 6 | Solved
Reply
Join Date: Mar 2007
Posts: 22
Reputation: pranavdv is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
pranavdv pranavdv is offline Offline
Newbie Poster

Question email and website validation

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2007
Posts: 69
Reputation: SCBWV is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 9
SCBWV SCBWV is offline Offline
Junior Poster in Training

Re: email and website validation

  #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  
Join Date: Mar 2007
Posts: 22
Reputation: pranavdv is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
pranavdv pranavdv is offline Offline
Newbie Poster

Question Re: email and website validation

  #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  
Join Date: Apr 2007
Posts: 69
Reputation: SCBWV is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 9
SCBWV SCBWV is offline Offline
Junior Poster in Training

Re: email and website validation

  #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  
Join Date: Mar 2007
Posts: 22
Reputation: pranavdv is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
pranavdv pranavdv is offline Offline
Newbie Poster

Question Re: email and website validation

  #5  
Jan 4th, 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  
Join Date: Apr 2007
Posts: 69
Reputation: SCBWV is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 9
SCBWV SCBWV is offline Offline
Junior Poster in Training

Re: email and website validation

  #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  
Join Date: Mar 2007
Posts: 22
Reputation: pranavdv is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
pranavdv pranavdv is offline Offline
Newbie Poster

Re: email and website validation

  #7  
Jan 5th, 2008
thnx for solutions
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 5:38 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC