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: Missing some locale codes in note #1043

Closed
StefSmit12 opened this issue Apr 29, 2021 · 3 comments
Closed

fix: Missing some locale codes in note #1043

StefSmit12 opened this issue Apr 29, 2021 · 3 comments
Labels
status: done/released Issue has been completed, no further action is needed. type: fix Issues describing a broken feature.

Comments

@StefSmit12
Copy link

Description

ispostalcode can validate postcodes more countries than stated in the notes. By example; note is missing the country codes SG, SI, SK.

Minimal code-snippet showcasing the problem

/**
 * Check if the string is a postal code,
 * (locale is one of [ 'AD', 'AT', 'AU', 'AZ', 'BE', 'BG', 'BR', 'CA', 'CH', 'CZ', 'DE', 'DK', 'DO', 'DZ', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HU', 'ID', 'IE' 'IL', 'IN', 'IR', 'IS', 'IT', 'JP', 'KE', 'KR', 'LI', 'LT', 'LU', 'LV', 'MX', 'MT', 'MY', 'NL', 'NO', 'NP', 'NZ', 'PL', 'PR', 'PT', 'RO', 'RU', 'SA', 'SE', 'SG', 'SI', 'SK', 'TN', 'TW', 'UA', 'US', 'ZA', 'ZM' ] OR 'any'. If 'any' is used, function will check if any of the locals match. Locale list is validator.isPostalCodeLocales.).
 * If given value is not a string, then it returns false.
 */

Expected behavior

Actual behavior

@StefSmit12 StefSmit12 added status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature. labels Apr 29, 2021
@NoNameProvided NoNameProvided removed the status: needs triage Issues which needs to be reproduced to be verified report. label Nov 20, 2022
@NoNameProvided
Copy link
Member

I have removed the hard-coded JSDoc list. The function is typed so users will always see the up-to-date list of options as code completion.

Landed in cf8d2c0.

@NoNameProvided NoNameProvided added the status: fixed Issues with merged PRs, but not released yet. label Nov 20, 2022
@NoNameProvided NoNameProvided added status: done/released Issue has been completed, no further action is needed. and removed status: fixed Issues with merged PRs, but not released yet. labels Dec 9, 2022
@NoNameProvided
Copy link
Member

This feature/fix has been released in 0.14.0.

@github-actions
Copy link

github-actions bot commented Jan 9, 2023

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 Jan 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: done/released Issue has been completed, no further action is needed. type: fix Issues describing a broken feature.
Development

Successfully merging a pull request may close this issue.

2 participants