Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const phones = {
'ca-AD': /^(\+376)?[346]\d{5}$/,
'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
'da-DK': /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,
'de-DE': /^((\+49|0)[1|3])([0|5][0-45-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,
'de-DE': /^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,
'de-AT': /^(\+43|0)\d{1,4}\d{3,12}$/,
'de-CH': /^(\+41|0)([1-9])\d{1,9}$/,
'de-LU': /^(\+352)?((6\d1)\d{6})$/,
Expand Down
2 changes: 1 addition & 1 deletion test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -6207,7 +6207,6 @@ describe('Validators', () => {
locale: 'de-DE',
valid: [
'+4915123456789',
'+4930405044550',
'015123456789',
'015123456789',
'015623456789',
Expand All @@ -6222,6 +6221,7 @@ describe('Validators', () => {
'015412345678',
],
invalid: [
'+4930405044550',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is landline all +4930 are landlines. Mobile phone numbers must start with https://en.wikipedia.org/wiki/Telephone_numbers_in_Germany#Non-geographic_numbering must start with a 15, 16 or 17

'34412345678',
'14412345678',
'16212345678',
Expand Down