mirror of
https://github.com/Respect/Validation.git
synced 2024-06-01 21:32:14 +02:00
Update validation for Armenian postal codes
According to Wikipedia[1]: > Postal codes in Armenia consist of four digits. Until April 1, 2006, > they consisted of six digits. [1]: https://en.wikipedia.org/wiki/Postal_codes_in_Armenia Co-authored-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
parent
a44f97f4b3
commit
6e2b3e599e
|
@ -30,7 +30,7 @@ final class PostalCode extends AbstractEnvelope
|
|||
// phpcs:disable Generic.Files.LineLength.TooLong
|
||||
'AD' => '/^(?:AD)*(\d{3})$/',
|
||||
'AL' => '/^(\d{4})$/',
|
||||
'AM' => '/^(\d{6})$/',
|
||||
'AM' => '/^(\d{4})$/',
|
||||
'AR' => '/^[A-Z]?\d{4}[A-Z]{0,3}$/',
|
||||
'AS' => '/96799/',
|
||||
'AT' => '/^(\d{4})$/',
|
||||
|
|
|
@ -87,6 +87,7 @@ final class PostalCodeTest extends RuleTestCase
|
|||
[new PostalCode('KY'), 'KY2-2001'],
|
||||
[new PostalCode('KY'), 'KY2-2001'],
|
||||
[new PostalCode('KY'), 'KY3-2500'],
|
||||
[new PostalCode('AM'), '0010'],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -109,6 +110,7 @@ final class PostalCodeTest extends RuleTestCase
|
|||
[new PostalCode('KR'), '548-940'],
|
||||
[new PostalCode('EC'), 'A1234B'],
|
||||
[new PostalCode('KY'), 'KY4-2500'],
|
||||
[new PostalCode('AM'), '375010'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue