Skip to content

Commit

Permalink
clean up isMobile Austria number
Browse files Browse the repository at this point in the history
Co-authored-by: Ezrqn Kemboi <[email protected]>
closes validatorjs#1038 validatorjs#1028
  • Loading branch information
ezkemboi committed Jul 9, 2019
1 parent 8252cb5 commit ec8b063
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var phones = {
'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(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7}$/,
'de-AT': /^(\+43)?0?6\d{9}$/,
'de-AT': /^(\+43|0)\d{1,4}\d{3,12}$/,
'el-GR': /^(\+?30|0)?(69\d{8})$/,
'en-AU': /^(\+?61|0)4\d{8}$/,
'en-GB': /^(\+?44|0)7\d{9}$/,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.4.5",
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/register": "^7.4.4",
"@babel/register": "^7.0.0",
"babel-eslint": "^10.0.1",
"babel-plugin-add-module-exports": "^1.0.0",
"eslint": "^4.19.1",
Expand Down Expand Up @@ -69,4 +69,4 @@
"node": ">= 0.10"
},
"license": "MIT"
}
}
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const phones = {
'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(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7}$/,
'de-AT': /^(\+43)?0?6\d{9}$/,
'de-AT': /^(\+43|0)\d{1,4}\d{3,12}$/,
'el-GR': /^(\+?30|0)?(69\d{8})$/,
'en-AU': /^(\+?61|0)4\d{8}$/,
'en-GB': /^(\+?44|0)7\d{9}$/,
Expand Down
11 changes: 8 additions & 3 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -3819,11 +3819,16 @@ describe('Validators', () => {
valid: [
'+436761234567',
'06761234567',
'00436123456789',
'+436123456789',
'01999',
'+4372876',
'06434908989562345',
],
invalid: [
'067612345678',
'+4367612345678',
'12345',
'167612345678',
'1234',
'064349089895623459',
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ var phones = {
'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(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7}$/,
'de-AT': /^(\+43)?0?6\d{9}$/,
'de-AT': /^(\+43|0)\d{1,4}\d{3,12}$/,
'el-GR': /^(\+?30|0)?(69\d{8})$/,
'en-AU': /^(\+?61|0)4\d{8}$/,
'en-GB': /^(\+?44|0)7\d{9}$/,
Expand Down
2 changes: 1 addition & 1 deletion validator.min.js

Large diffs are not rendered by default.

0 comments on commit ec8b063

Please sign in to comment.