ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Phone Number Validation
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Phone Number Validation

 Post Reply Post Reply
Author
Message
Kevin Markle View Drop Down
Newbie
Newbie


Joined: 25-May-2011
Location: Rochester Hills
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kevin Markle Quote  Post ReplyReply Direct Link To This Post Topic: Phone Number Validation
    Posted: 25-May-2011 at 3:34pm
In the onepagecheckoutJS.asp program (ProductCart v4), how can I validate the billing phone number beyond setting it to: required and minlength(10)?  I'm trying to achieve a phone number in the following format: xxx-xxx-xxxx.  This implies a mimimum of 10 numbers with a possible addition of blanks or dashes.   Users could add additional digits for an extension or international phone numbers.  The phone number field should never be able to accept: "phonenumber" as a valid phone number.  However, it currently meets the required condition and minimum length of field.
 
Thanks again for any help in advance.
 
Kevin Markle
Back to Top
ProductCart View Drop Down
Admin Group
Admin Group

ProductCart Team

Joined: 01-October-2003
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote ProductCart Quote  Post ReplyReply Direct Link To This Post Posted: 25-May-2011 at 5:07pm
Hi Kevin,

phone number validation is very tricky as people enter phone numbers in all kinds of ways, especially when it comes to international phone numbers.

We decided that it actually makes more sense to accept any string rather than showing validation messages that could frustrate a customer and make them leave the checkout process.

You can always follow-up with a customer after the order has been placed - and before processing it - to request a correct phone number, if one was not entered. You can use the built-in Help Desk for that reason.
The ProductCart Team

Home of ProductCart shopping cart software
Back to Top
Kevin Markle View Drop Down
Newbie
Newbie


Joined: 25-May-2011
Location: Rochester Hills
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kevin Markle Quote  Post ReplyReply Direct Link To This Post Posted: 25-May-2011 at 5:31pm

Thank you for the prompt reply.  However, my management insisted on the billing phone field validation. 

I was successful this afternoon in including a modified version of the phoneUS jquery construct (.* at the end of the validation to accept additional characters) in the onepagecheckoutJS.asp program.  Now the billing phone number field accepts any 10 digit phone number with any additional characters at the end of the string.  However, characters cannnot be in the first 12 digits (e.g. "phonenumber" now fails) and xxx-xxx-xxxx ext. 321 (is correctly accepted).
Back to Top
Kevin Markle View Drop Down
Newbie
Newbie


Joined: 25-May-2011
Location: Rochester Hills
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kevin Markle Quote  Post ReplyReply Direct Link To This Post Posted: 26-May-2011 at 10:44am
This morning I had to back off the phoneUS validation.  Although the jquery construct worked fine in my environment (IE8), selected external users found themselves in an infinite loop and could not continue through the checkout process.  The construct also did not work successfully in IE9.  However, I currently do not have a good understanding of why this external construct did not work in all user environments after extensive browser testing.
 
My final step was to return to field: required and minlength(10) for billing phone number validation.
Back to Top
Kevin Markle View Drop Down
Newbie
Newbie


Joined: 25-May-2011
Location: Rochester Hills
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kevin Markle Quote  Post ReplyReply Direct Link To This Post Posted: 31-May-2011 at 3:01pm
I was finally successful in launching the phoneUS jquery construct after finding an extra comma left behind after removing an extra message.  The billing phone number validation is working correctly now.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.078 seconds.