Skip to content

Conversation

@pano9000
Copy link
Contributor

fixes #2135

Checklist

  • PR contains only changes related; no stray files, etc.
  • [ ] README updated (where applicable)
  • [ ] Tests written (where applicable)

replace "word boundary" anchor `\b` with start/end of line anchors `^` / `$`, to fix this

fixes validatorjs#2135
@WikiRik
Copy link
Member

WikiRik commented Dec 20, 2022

Can you add a test for postal codes that are now marked as invalid?

@codecov
Copy link

codecov bot commented Dec 20, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (c9dfce2) compared to base (531dc7f).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2136   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          104       104           
  Lines         2308      2308           
  Branches       578       578           
=========================================
  Hits          2308      2308           
Impacted Files Coverage Δ
src/lib/isPostalCode.js 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rubiin rubiin added ✅ LGTM ready-to-land For PRs that are reviewed and ready to be landed labels Jan 21, 2023
Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✅ LGTM ready-to-land For PRs that are reviewed and ready to be landed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

isPostalCode: Iran (IR) RegExp is too permissive, matches invalid postal codes

4 participants