Validation
Validation copied to clipboard
Update PostalCode.php
Whitespace in CZ zip is mandatory
Codecov Report
Merging #1339 (6bbb790) into master (3dcd859) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #1339 +/- ##
=========================================
Coverage 95.77% 95.77%
Complexity 948 948
=========================================
Files 191 191
Lines 2014 2014
=========================================
Hits 1929 1929
Misses 85 85
Impacted Files | Coverage Δ | Complexity Δ | |
---|---|---|---|
library/Rules/PostalCode.php | 100.00% <ø> (ø) |
2.00 <0.00> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 3dcd859...6bbb790. Read the comment docs.
Source to review: https://en.wikipedia.org/wiki/List_of_postal_codes
From the release 2.3
onwards, you can decide whether PostalCode
will validate formatting or not, and we will start supporting regexes for both cases.
Check the docs for the upcoming release:
https://github.com/Respect/Validation/blob/2.3/docs/rules/PostalCode.md
I won't accept your PR because it is targeted for an older PostalCode rule, but I added a test case for your scenario.
Thanks for reporting this 🐼
This fix is available on version 2.3!