Skip to content

Commit

Permalink
Merge pull request #332 from visualitypl/master
Browse files Browse the repository at this point in the history
Add support for UAE mobile format +971 54 XXX XXXX
  • Loading branch information
floere committed Aug 10, 2016
2 parents 9fd466b + fc72150 commit 1ddd00f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/phony/countries.rb
Expand Up @@ -1090,7 +1090,7 @@
one_of('800') >> matched_split(
/\A\d{2}\z/ => [2],
/\A\d+\z/ => [2,3,4]) | # freephone
one_of(%w(50 52 55 56)) >> split(3,4) | # mobile
one_of(%w(50 52 54 55 56)) >> split(3,4) | # mobile
one_of(%w(2 3 4 6 7 9)) >> split(3,4) |
fixed(1) >> split(3,4)

Expand Down
3 changes: 2 additions & 1 deletion spec/functional/plausibility_spec.rb
Expand Up @@ -308,7 +308,8 @@ def self.it_is_correct_for(country_name, options={})
'+971 50 641 2345',
'+971 600 641 234',
'+971 500 641 234',
'+971 200 641 234']
'+971 200 641 234',
'+971 54 999 9999']

it_is_correct_for 'United Kingdom', :samples => ['+44 1827 50111'], :invalid_samples => ['+44 0000 123456']

Expand Down
1 change: 1 addition & 0 deletions spec/lib/phony/countries_spec.rb
Expand Up @@ -1217,6 +1217,7 @@ def self.it_splits number, expected
it_splits '971600641234', %w(971 600 641 234)
it_splits '971500641234', %w(971 500 641 234)
it_splits '971200641234', %w(971 200 641 234)
it_splits '971549999999', %w(971 54 999 9999)
end
describe 'Uruguay (Eastern Republic of)' do
it_splits '59880012345', %w(598 800 123 45)
Expand Down

0 comments on commit 1ddd00f

Please sign in to comment.