VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 VP-ASP 6.00 Questions
 Validate phone number as numerical
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

psychobilly
Starting Member

USA
9 Posts

Posted - February 01 2003 :  01:45:38  Show Profile  Reply with Quote
I need to validate the that the phone field is only a number. No spaces or hyphens. Any ideas? Thanks

Superal
VP-ASP Expert

Canada
542 Posts

Posted - February 01 2003 :  02:58:10  Show Profile  Reply with Quote
Trim all of the spaces from it. Check if it is a number with ISNUMERIC and then check the length.

strphone=trim(strphone)
if len(strphone)<> 10 then
if not isnumeric(strphone) then
sError = sError & LangCustPhone & LangCustRequired & "<br>"
end if
end if

Go to Top of Page

psychobilly
Starting Member

USA
9 Posts

Posted - February 01 2003 :  14:03:21  Show Profile  Reply with Quote
cool, thanks. works great!!!

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000