Skip to content

Commit 9135b2f

Browse files
committed
Fix Dutch country code
+31 is the Dutch country code. See: https://en.wikipedia.org/wiki/Telephone_numbers_in_the_Netherlands
1 parent 3a65e1e commit 9135b2f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/locales/nl.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ nl:
8383
- "#{first_name} #{last_name} #{last_name}"
8484

8585
phone_number:
86+
country_code:
87+
- '31'
8688
formats: ["(####) ######", "##########", "06########", "06 #### ####"]
8789

8890
university:

test/test_nl_locale.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ def test_nl_phone_number_methods
6565
assert_kind_of String, Faker::PhoneNumber.cell_phone
6666
end
6767

68+
def test_nl_cell_phone_countrycode
69+
mobile = Faker::PhoneNumber.cell_phone_with_country_code.gsub(/\D/, '')
70+
71+
assert_match(/^(0|31)/, mobile)
72+
end
73+
6874
def test_nl_university_methods
6975
assert_kind_of String, Faker::University.prefix
7076
assert_kind_of String, Faker::University.name

0 commit comments

Comments
 (0)