mirror of
https://github.com/Respect/Validation.git
synced 2024-06-08 00:32:16 +02:00
Update Korean postal code validation
The Korea Postal code system changed from a 6-digit postal code system to a 5-digit postal code system on August 1, 2015 [1] [2]. This commit makes sure that the "PostalCode" rule validates Korean postal codes correctly. [1]: http://www.fedex.com/ky/koreapostalcode/index.html [2]: http://www.epost.go.kr/roadAreaCdEng.retrieveLnEngAreaCdList.comm Co-authored-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
parent
203f8e7e9d
commit
892b39e5ff
|
@ -96,7 +96,7 @@ class PostalCode extends Regex
|
|||
'KG' => '/^(\d{6})$/',
|
||||
'KH' => '/^(\d{5})$/',
|
||||
'KP' => '/^(\d{6})$/',
|
||||
'KR' => '/^(?:SEOUL)*(\d{6})$/',
|
||||
'KR' => '/^(\d{5})$/',
|
||||
'KW' => '/^(\d{5})$/',
|
||||
'KZ' => '/^(\d{6})$/',
|
||||
'LA' => '/^(\d{5})$/',
|
||||
|
|
|
@ -96,6 +96,7 @@ class PostalCodeTest extends \PHPUnit_Framework_TestCase
|
|||
['PT', '3660-606'],
|
||||
['PT', '3660606'],
|
||||
['CO', '110231'],
|
||||
['KR', '03187'],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -130,6 +131,8 @@ class PostalCodeTest extends \PHPUnit_Framework_TestCase
|
|||
['US', '021 79'],
|
||||
['YE', '02179'],
|
||||
['PL', '99300'],
|
||||
['KR', '548940'],
|
||||
['KR', '548-940'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue