Link to home
Start Free TrialLog in
Avatar of groovymonkey
groovymonkeyFlag for Canada

asked on

VbScript form validation for phone number, outlook email address formats

Hello,
I need some help regarding form validation of several items I have on a form.
Here is the pseudocode for the telephone format I want

if trim(request.querystring("tel")) does not fit the pattern (555) 555-5555 then     flag="error"
     response.write("Please enter a valid telephone number")
     response.write("<br>")
end if

Here is the pseudocode for the email format I want
*please note that the email I am checking for I only want to check that the address has a "," somewhere in the middle.

if trim(request.querystring("email")) does not fit the pattern AAA, AAA then     flag="error"
     response.write("Please enter a valid telephone number")
     response.write("<br>")
end if

thanks for all help
ASKER CERTIFIED SOLUTION
Avatar of nishikanth
nishikanth

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial