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
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / pankaj jaju
Function IsValidEmail(strEmail)
If Len(strEmail) > 25 Then
IsValidEmail = "Email contains > 25 characters"
ElseIf LCase(Right(strEmail, 4)) <> ".net" AND LCase
(Right(strEmail, 4)) <> ".com" AND LCase(Right(strEmail,
4)) <> ".org" Then
IsValidEmail = "Email contains invalid
domain name. Use only .com or .net or .org domains only"
ElseIf UBound(Split(strEmail,"@")) > 1 Then
IsValidEmail = "@ character is used
multiple time"
ElseIf UBound(Split(strEmail,"@")) < 1 Then
IsValidEmail = "@ character is missing"
Else
IsValidEmail = True
End If
End Function
Is This Answer Correct ? | 0 Yes | 0 No |
how to find the textfile in the folder and copy file from one folder to another folder useing parameterigation in QTP
I have attended Anovatek Software QTP interview. They will give us computer and one web based application with QTP. We have to automate some records (already updated records or new records) using QTP Data driven testing. But we should use for loop? Can any one know how to do data driven testing using For loop?
please can you help me to get a code of flames using a visual basic 6
Mention how to create a cookie using vbscript?
How to capture a runtime error in vbscript?
Is it possible to pass optional argument to function in vb script?
what is test scenario?
a;;b;c;;;d in this string output is abcd will come how can we do that in vbscript in QTP testing?
How will you convert a string to lower case string using vbscript?
Mention what is vbscript?
i have to open a notepad having no. of words in dat file by recording in qtp and then find a particular word and display true or false
write a vb script to generate the following pattern ***** **** *** ** *