Validation icon indicating copy to clipboard operation
Validation copied to clipboard

Update PostalCode.php

Open gpredl opened this issue 4 years ago • 2 comments

Whitespace in CZ zip is mandatory

gpredl avatar Feb 09 '21 13:02 gpredl

Codecov Report

Merging #1339 (6bbb790) into master (3dcd859) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            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.

codecov-io avatar Feb 09 '21 13:02 codecov-io

Source to review: https://en.wikipedia.org/wiki/List_of_postal_codes

gpredl avatar Feb 15 '21 09:02 gpredl

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 🐼

alganet avatar Feb 19 '23 02:02 alganet

This fix is available on version 2.3!

henriquemoody avatar Jan 27 '24 19:01 henriquemoody