Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Cart & Checkout blocks: Inline validation for postal code does not work for certain countries #8983

Closed
ralucaStan opened this issue Apr 7, 2023 · 1 comment · Fixed by #8987
Labels
block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. status: blocker Used on issues or pulls that block work from being released. type: bug The issue/PR concerns a confirmed bug.

Comments

@ralucaStan
Copy link
Contributor

ralucaStan commented Apr 7, 2023

Describe the bug

A clear and concise description of what the bug is.
Inline validation for postal code does not work for certain countries, the shopper can't type into the postcode field.

To reproduce

Steps to reproduce the behavior:

  1. Go to the Checkout block
  2. Select Afghanistan or Albania for the country field
  3. Try to type in the Postcode field
  4. Notice that typing isn't possible

Expected behavior

The shopper should be able to type

Background

The issue was introduced in #8503 and it's coming from this line https://github.com/woocommerce/woocommerce-blocks/pull/8503/files#diff-4b3f84282ae808cb2a22cc043685c689352f9f56dcfde568136076ddeff7aad5R31 because the postcode validation library does not cater for every country.

!! unit tests should be added along with the fix

@ralucaStan ralucaStan added type: bug The issue/PR concerns a confirmed bug. block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. labels Apr 7, 2023
@ralucaStan
Copy link
Contributor Author

p1680880333339619/1680867116.508929-slack-C8X6Q7XQU

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. status: blocker Used on issues or pulls that block work from being released. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
1 participant