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/103' into develop
Browse files Browse the repository at this point in the history
Forward port #103
  • Loading branch information
michalbundyra committed Sep 25, 2019
2 parents 0531a09 + f3975db commit beeb776
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -52,6 +52,8 @@ All notable changes to this project will be documented in this file, in reverse

- [#116](https://github.com/zendframework/zend-i18n/pull/116) fixes PhoneNumber validator to match the whole value.

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

## 2.9.0 - 2018-05-16

### Added
Expand Down
6 changes: 3 additions & 3 deletions src/Validator/PhoneNumber/BR.php
Expand Up @@ -12,16 +12,16 @@
'patterns' => [
'national' => [
'general' => '/^(?:[1-46-9]\\d{7,10}|5\\d{8,9})$/',
'fixed' => '/^(?:1[1-9][2-5]\\d{7}|(?:[4689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-5]\\d{7})$/',
'mobile' => '/^(?:1(?:1(?:5[347]|[6-8]\\d|9\\d{1,2})|[2-9][6-9]\\d)\\d{6}|(?:[4689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[6-9]\\d{7})$/',
'fixed' => '/^(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-5]\\d{7}$/',
'mobile' => '/^(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])9[6-9]\\d{7}$/',
'tollfree' => '/^800\\d{6,7}$/',
'premium' => '/^[359]00\\d{6,7}$/',
'shared' => '/^[34]00\\d{5}$/',
'emergency' => '/^(?:1(?:12|28|9[023])|911)$/',
],
'possible' => [
'general' => '/^\\d{8,11}$/',
'mobile' => '/^\\d{10,11}$/',
'mobile' => '/^\\d{11}$/',
'shared' => '/^\\d{8}$/',
'emergency' => '/^\\d{3}$/',
],
Expand Down
2 changes: 1 addition & 1 deletion test/Validator/PhoneNumberTest.php
Expand Up @@ -402,7 +402,7 @@ class PhoneNumberTest extends TestCase
'patterns' => [
'example' => [
'fixed' => '1123456789',
'mobile' => '1161234567',
'mobile' => ['11961234567', '11991234567'],
'tollfree' => '800123456',
'premium' => '300123456',
'shared' => '40041234',
Expand Down

0 comments on commit beeb776

Please sign in to comment.