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 difference between vbscript and vba?
How to take whole text output from screen of Bitmap Application.
What is vbscript language used for and which earlier language is it modeled upon?
1. How do declare public variable in vb scripts?
Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)
What is Procedure or Subroutine in VB Script?
while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans
What is loose binding? Why is it not a good practice to use it?
I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?
how to comvert 120 into one hunderd twenty rupees only and vice varsa
How to pass argument by reference to a function in vbscript?
how to check whether link is disabled in QTP??
Out of the different type of operators, which are evaluated first and last in the vbscript language?
What is difference between vbscript and vba?
Which conditional statement is the most convenient one to use in the case of multiple conditions in the vbscript language?