Checkout Zip Code Validation and Formatting

Hi,

I’m looking for a solution to automatically format a client’s zip code (post code) after they enter it. For example, if a client enters the zip code with a country code, a space between the country code and zip code, or even a dash, the app should format the zip code by removing these extra symbols.

For instance, if the customer input is “LT-51614,” the app should format it to “LT51614.”

Any suggestions? Thanks in advance!

Hi @Karolis3 ,

To validate and format zip codes / postal codes the best way is to use Checkout Validation Functions:

https://shopify.dev/docs/apps/build/checkout/cart-checkout-validation/create-server-side-validation

1 Like

Hi,

Is it possible to code using Basic Shopify plan? Thanks.