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:
Daniel Altenburg 2020-02-12 09:56:12 -05:00 committed by Henrique Moody
parent a44f97f4b3
commit 6e2b3e599e
No known key found for this signature in database
GPG key ID: 221E9281655813A6
2 changed files with 3 additions and 1 deletions

View file

@ -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})$/',

View file

@ -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'],
];
}
}