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 purpose of the err object in the vbscript language?
Mention how you can call vbscript functions?
How do you declare a variable in vbscript?
How to assign a numeric value to a variable?
when we use filter funtiom invb script(QTP)
Both Static and dynamic arrays are handled by VB script. Is it true?
Hi All, I am facing one problem in QTP. There is link object in my application that exist in the Frame in mozilla firefox. Click event on that object is not working but once the frame is enabled/activated then click event works fine.But the frame does not have the activate property. This problem is coming in firefox only. Regards
Differentiate javascript and vbscript?
Explain sga memory structures?
What is variant in vb script?
In what way program "hello world" you can write in vbscript?
Explain about the support of asp for vb script functionality?
A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.
Is vbscript language a case-sensitive language and what does it mean?
What are the valid scopes of a variable in vbscript?