Zip Code

How can we setup zip code to be 6 digits minimum ?


in cs-cart zip code format is based on country and validation rules are hardcoded.

do you need to set 6 digits minimum for all counties?

also what is your cs-cart version?

best regards

WSA team

We use cs-cart 4.3.1

Please edit regular expressions for the zipcode in the following file:


$.ceFormValidator('setZipcode', {
US: {
regexp: /^(\d{5})(-\d{4})?$/,
format: '01342 (01342-5678)'
CA: {
regexp: /^(\w{3} ?\w{3})$/,
format: 'K1A OB1 (K1AOB1)'
RU: {
regexp: /^(\d{6})?$/,
format: '123456'

please don't forget to clean up the template and browser cache after the change

best regards,

WSA team