Welcome, Guest ( Customer Panel | Login )




 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-CART 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
0 Item(s)
$0.00