mirror of
https://github.com/Respect/Validation.git
synced 2024-06-08 08:42:15 +02:00
Update Serbian postal code validation
According to Wikipedia, also known as the most reliable source of information on the whole Internet, Serbian postal codes consist of five digits [1]. Even though it mentions that a six-digit postal code format has been in place since 1 January 2005 [2], I have not found any Serbian postal code which consists of six digits. Maybe someone would prove us wrong, but we will keep the validation as six-digits from now one. [1]: https://en.wikipedia.org/wiki/Postal_codes_in_Serbia [2]: https://web.archive.org/web/20090917083620/http://www.posta.rs/postanskamreza/postanskamreza.asp Co-authored-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
parent
e2783d4220
commit
0a3f4c6a4b
|
@ -156,7 +156,7 @@ final class PostalCode extends AbstractEnvelope
|
|||
'PY' => '/^(\d{4})$/',
|
||||
'RE' => '/^((97|98)(4|7|8)\d{2})$/',
|
||||
'RO' => '/^(\d{6})$/',
|
||||
'RS' => '/^(\d{6})$/',
|
||||
'RS' => '/^(\d{5})$/',
|
||||
'RU' => '/^(\d{6})$/',
|
||||
'SA' => '/^(\d{5})$/',
|
||||
'SD' => '/^(\d{5})$/',
|
||||
|
|
|
@ -88,6 +88,7 @@ final class PostalCodeTest extends RuleTestCase
|
|||
[new PostalCode('KY'), 'KY2-2001'],
|
||||
[new PostalCode('KY'), 'KY3-2500'],
|
||||
[new PostalCode('AM'), '0010'],
|
||||
[new PostalCode('RS'), '24430'],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -111,6 +112,7 @@ final class PostalCodeTest extends RuleTestCase
|
|||
[new PostalCode('EC'), 'A1234B'],
|
||||
[new PostalCode('KY'), 'KY4-2500'],
|
||||
[new PostalCode('AM'), '375010'],
|
||||
[new PostalCode('RS'), '244300'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue