-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat(isPostalCode): add BD
locale
#2551
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2551 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 114 114
Lines 2535 2535
Branches 641 641
=========================================
Hits 2535 2535 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a small suggestion to simplify the regex
Any update on this one? |
This pull request includes updates to the
README.md
documentation, theisPostalCode
validation logic, and the associated tests to add support for Bangladeshi postal codes.Documentation update:
README.md
: Added 'BD' (Bangladesh) to the list of supported locales for theisPostalCode
function.Validation logic update:
src/lib/isPostalCode.js
: Added a new regular expression pattern for Bangladeshi postal codes to thepatterns
object.Test update:
test/validators.test.js
: Added test cases for Bangladeshi postal codes, including both valid and invalid examples.Reference: Bangladehi postal code list in Wikipedia
Checklist