Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: IsPostalCode does not recognize Cayman Islands #1791

Closed
mjrichards91 opened this issue Nov 17, 2022 · 2 comments
Closed

fix: IsPostalCode does not recognize Cayman Islands #1791

mjrichards91 opened this issue Nov 17, 2022 · 2 comments
Labels
status: invalid / expired Issues with no action to take. type: fix Issues describing a broken feature.

Comments

@mjrichards91
Copy link

Description

Postal codes in the Cayman Islands return as invalid, i.e. KY1-1108. It doesn't seem like the locale KY is supported.

Minimal code-snippet showcasing the problem

@IsPostalCode('any')
postalCode: string

Expected behavior

Validation to be successful.

Actual behavior

Validation fails with the message "postalCode must be a postal code".

@mjrichards91 mjrichards91 added status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature. labels Nov 17, 2022
@NoNameProvided
Copy link
Member

Our postal code validation (as many other operators) is simply a call through to https://github.com/validatorjs/validator.js. After a quick look at the code and search on Google, it seems not all countries as supported and the KY code for the Cayman Islands is not present in the PostalCodeLocale type.

There is an open discussion about adding support for additional countries in validator.js here: validatorjs/validator.js#722.

Closing this as invalid because the issue is in an upstream library.

@NoNameProvided NoNameProvided added status: invalid / expired Issues with no action to take. and removed status: needs triage Issues which needs to be reproduced to be verified report. labels Nov 18, 2022
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: invalid / expired Issues with no action to take. type: fix Issues describing a broken feature.
Development

No branches or pull requests

2 participants