Skip to content

Commit 7e68296

Browse files
authored
Update isPostalCode.js
Taiwan has added in 2020 a 3+3 postal code format that is also available. https://www.post.gov.tw/post/internet/U_english2/index.jsp?ID=3509010116#:~:text=6%20digits.,serial%20number%E2%80%9D%20of%20ordinary%20households. https://www.wikiwand.com/en/articles/Postal_codes_in_Taiwan Even tho it's mainly for internal usage, it is still a valid format that might be required in some usecase. Therefore, I believe this library should consider it a valid postal code.
1 parent a7d5cff commit 7e68296

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/isPostalCode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const patterns = {
6969
SK: /^\d{3}\s?\d{2}$/,
7070
TH: fiveDigit,
7171
TN: fourDigit,
72-
TW: /^\d{3}(\d{2})?$/,
72+
TW: /^\d{3}(\d{2,3})?$/,
7373
UA: fiveDigit,
7474
US: /^\d{5}(-\d{4})?$/,
7575
ZA: fourDigit,

0 commit comments

Comments
 (0)