-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Issue
Zip code validation fails on adresses from South Korea since it validates against deprecated format.
Current validation is 123-456. This should be 12345.
"Postal codes in South Korea are 5-digit numeric, whose system newly introduced in August 1, 2015." (https://en.wikipedia.org/wiki/List_of_postal_codes_in_South_Korea)
Preconditions
On all 2.* versions including development branch.
Steps to reproduce
go to cart or checkout, select South Korea and insert postal code 12345
Expected result
Validation should succeed.
Actual result
Validation fails
Solution
Replace:
<zip countryCode="KR"> <codes> <code id="pattern_1" active="true" example="123-456">^[0-9]{3}-[0-9]{3}$</code> </codes> </zip>
With:
<zip countryCode="KR"> <codes> <code id="pattern_1" active="true" example="12345">^[0-9]{5}$</code> </codes> </zip>
OR add it as a second pattern (for backwards compatibility ?)
in /app/code/Magento/Directory/etc/zip_codes.xml