Skip to content

Commit 22ce4e7

Browse files
committed
Merge pull request #2 from strayobject/no-pl-validation
added Norway and Poland to validation
2 parents de39f18 + f8500f4 commit 22ce4e7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Validator/LocalizedPostalCodeValidatorClosureProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public function fetchValidatorForCountry($country, $message = null)
7575

7676
case 'DK':
7777
case 'BE':
78+
case 'NO';
7879
return $this->createValidatorClosureForConstraint($this->getFixedLengthDigitConstraint(4, $message));
7980
break;
8081

@@ -90,6 +91,10 @@ public function fetchValidatorForCountry($country, $message = null)
9091
return $this->createValidatorClosureForConstraint($this->getMultipleRegexConstraint(array('/^\d{4}\s[A-Z]{2}$/'), $message));
9192
break;
9293

94+
case 'PL':
95+
return $this->createValidatorClosureForConstraint($this->getMultipleRegexConstraint(array('/^\d{2}\-\d{3}$/'), $message));
96+
break;
97+
9398
case 'PT':
9499
return $this->createValidatorClosureForConstraint($this->getMultipleRegexConstraint(array('/^\d{4}\-\d{3}$/'), $message));
95100
break;

0 commit comments

Comments
 (0)