Customer data validation


As I said on previous post, I have a couple of questions regarding customization, so here goes the second one.

When a customer inputs his data, it is validated by a javascript. In our country the postal code is not used, so customers won’t be filling in this information. Is there a way to either remove the validation from this field or input it hidden with a default value? I have tried filling in the default location info in the Administration configuration, but it isn’t used.

The second validation problem is with the phone number, our phone numbers are something like 555 55 55 or 55555555, or 555-55-55 and the script is rejecting the format. Is there a way to change this and how difficult will it be?

Hope this things can be easily sorted out as I really do like the cart.


I would really like to know if the phone format validation can be easily changed. I have tried looking through the javascripts but can’t find it. This would be a deal breaker for me if I can’t change it.

Well, I managed to figure out the phone validation part. In js/core.js, around line 64 change:

var min_digits = 10;

to something like

var min_digits = 5;

This really should be in the admin configuration if CS-Cart truly wants to be compliant globally.

Within Admin>Content>Lanquages>Translations, search for the text pattern that you would like to change, then change it to your preference.