accept an email id & validate it .email id should not exceed
25 characters the mail id should contain 3 characters
excluding domain name,@ and .(dot) the last 3 characters
of the domain should be net,com or org
Answer Posted / mudaseer
vmail=inputbox("enter the value")
vstr=right(vmail,3)
if len(vmail)>25 then
msgbox "length is too high"
elseif instr(vmail,"@")=0 or instr(vmail,".")=0 then
msgbox "invalid-@ or . is absent"
elseif (instr(vmail,"@")-1)<3 then
msgbox "invalid-length to less"
elseif not(vstr="org" or vstr="com" or vstr="net") then
msgbox "invalid-domain not correct"
else msgbox "valid"
end if
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the use of the instr function?
What is variant in vb script?
How to Import data from a file (file is on the desktop) to the data table
what is diff between static and dynaic arrys?
write a program to display configuration of a local system with the help of vb script.
How to open a file. What is the perpose of true and false mode there?
What are lbound and ubound in the vbscript language?
How to throw an error in vbscript?
write any ttest cases using check points and parameterization
how to increase the values in text box in a given text box increament by two values by clicking on button
Mention what is variant in vbscript?
Mention what is the difference between vbscript and vba?
Develop a parameterized action that accomplishes the following a. Launch a browser of users choice ( example : IE, chrome etc) b. Open up a search engine (Google, Bing etc) c. Perform a search d. Click a particular link depending on the user’s choice ( 1st , 2nd or third link)
Why to use option explicit in vb script?
Hai this is sheik, i want to learn VB scripts for web application pls guide me what are all basic things need to know to learn VB scripts in web application.