Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/119'
Browse files Browse the repository at this point in the history
Close #119
  • Loading branch information
michalbundyra committed Sep 25, 2019
2 parents 835b130 + 23d1dae commit 1905cec
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ All notable changes to this project will be documented in this file, in reverse

- [#117](https://github.com/zendframework/zend-i18n/pull/117) fixes French PhoneNumber validator.

- [#119](https://github.com/zendframework/zend-i18n/pull/119) fixes Kosovan PhoneNumber validator.

## 2.9.0 - 2018-05-16

### Added
Expand Down
18 changes: 9 additions & 9 deletions src/Validator/PhoneNumber/XK.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@
'code' => '383',
'patterns' => [
'national' => [
'general' => '/^[126-9]\\d{4,11}|3(?:[0-79]\\d{3,10}|8[2-9]\\d{2,9})$/',
'fixed' => '/^(?:1(?:[02-9][2-9]|1[1-9])\\d|2(?:[0-24-7][2-9]\\d|[389](?:0[2-9]|[2-9]\\d))|3(?:[0-8][2-9]\\d|9(?:[2-9]\\d|0[2-9])))\\d{3,8}$/',
'mobile' => '/^6(?:[0-689]|7\\d)\\d{6,7}$/',
'general' => '/^(?:[23][89]|4[3-79])\\d{6}$/',
'fixed' => '/^[23][89]\\d{6}$/',
'mobile' => '/^4[3-79]\\d{6}$/',
'tollfree' => '/^800\\d{3,9}$/',
'premium' => '/^(?:90[0169]|78\\d)\\d{3,7}$/',
'uan' => '/^7[06]\\d{4,10}$/',
'shortcode' => '/^1(?:1(?:[013-9]|\\d(2,4))|[89]\\d{1,4})$/',
'emergency' => '/^112|9[234]$/',
'shortcode' => '/^(?:1(?:1(?:[013-9]|\\d(2,4))|[89]\\d{1,4}))$/',
'emergency' => '/^(?:112|19[234])$/',
],
'possible' => [
'general' => '/^\\d{5,12}$/',
'fixed' => '/^\\d{5,12}$/',
'mobile' => '/^\\d{8,10}$/',
'general' => '/^\\d{8}$/',
'fixed' => '/^\\d{8}$/',
'mobile' => '/^\\d{8}$/',
'tollfree' => '/^\\d{6,12}$/',
'premium' => '/^\\d{6,12}$/',
'uan' => '/^\\d{6,12}$/',
'shortcode' => '/^\\d{3,6}$/',
'emergency' => '/^\\d{2,3}$/',
'emergency' => '/^\\d{3}$/',
],
],
];
14 changes: 14 additions & 0 deletions test/Validator/PhoneNumberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2977,6 +2977,20 @@ class PhoneNumberTest extends TestCase
],
],
],
'XK' => [
'code' => '383',
'patterns' => [
'example' => [
'fixed' => '38550001',
'mobile' => '44430693',
'tollfree' => '80012345',
'premium' => '90012345',
'uan' => '700123456',
'shortcode' => '18923',
'emergency' => ['112', '192','193', '194'],
],
],
],
'YE' => [
'code' => '967',
'patterns' => [
Expand Down

0 comments on commit 1905cec

Please sign in to comment.