There's a class called "validate-zip" and "validate-zip-international". How does that function know how many digits to validate against? Where do you adjust the settings that affect how many digits to validate against?
This is for Magento 1
magento-1validation
There's a class called "validate-zip" and "validate-zip-international". How does that function know how many digits to validate against? Where do you adjust the settings that affect how many digits to validate against?
This is for Magento 1
Best Answer
You can see all of the validation rules in
js/prototype/validation.js
If we inspect the regex code:
/(^\d{5}$)|(^\d{5}-\d{4}$)/
It validates for these formats:
12345
or12345-1234