javascript validation foxycart

  • Status Closed
  • Budget $30 - $250 USD
  • Total Bids 5

Project Description

Hi I need to validate 2 fields on Foxycart checkout in javascript with alert message if it's wrong

1. Phone number (eg 5246579787) 10 digits without space

2. Postal code canadian format (eg.: H7E1R3)

Canada's Postal Code rules: Letters and numbers alternate for exactly six characters (eg L0S1E0)

here you have the anwser from foxycart helpdesk but I need help to fixe it

Hey Dominic,

1. Checkout validation:

It is possible to add your own validations to the checkout. You'd just need to add some javascript to your checkout template to watch the desired fields, check the input on change, and alert the customer in some way to note if it is invalid.

2. Limited country/state fields

This is possible too, and you can replace the text input with a dropdown using javscript, but you'd need to take note of what happens behind the scenes when someone changes the text input as it stands now to ensure that you set the values properly. Another option would be to limit the text autocomplete to just be Canadian states and only Canada as the country. You should be able to get a good start from threads on the following page: [url removed, login to view]

Something worth noting is that we don't provide custom programming for stores, but if you're looking for a programmer to help you achieve these things, we can definately recommend some developers to you that can help you out.

Thanks for contacting FoxyCart. We try to give every question or comment the attention it deserves, but please do let us know if your question hasn't been answered. Also please feel free to post in our forum at

Get free quotes for a project like this
Awarded to:
Skills Required

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online