fix(isPostalCode): fix overly permissive IR regexp by pano9000 · Pull Request #2136 · validatorjs/validator.js
- replace "word boundary" anchor
\bwith start/end of line anchors^/$, to fix issue described in isPostalCode: Iran (IR) RegExp is too permissive, matches invalid postal codes #2135
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
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.
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!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters