It looks like Expresso store during the checkout process allows to use disallowed characters in postal code and city fields for shipping. Also postal code allows to put only 2 characters when shorter in the world is 3 digits. It creates problems when UPS or FedEx modules are used for shipping calculation.

Any clue how to limit postal code when shipping is only in the States and validate city name if doesn't contains numbers etc?


1 Answer 1


There are a couple of ways that you can validate your fields. You could use HTML5 validators such as number for zip codes. Something along the lines of

<input type="number" name="billing_postcode" maxlength="5" minlength="5" >

Personally though I prefer using the CodeIgniter Styled Validation Rules:

 rules:phone="numeric" {!-- this would be applied to both shipping and billing fields --}

(Store documentation on Rules.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.