Skip to content

Commit

Permalink
Update isMobilePhone.js
Browse files Browse the repository at this point in the history
Add support for Nigerian phone numbers.
  • Loading branch information
ojengwa authored Jan 24, 2017
1 parent 1ed9ee5 commit d7fa323
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ var phones = {
'en-GB': /^(\+?44|0)7\d{9}$/,
'en-HK': /^(\+?852\-?)?[569]\d{3}\-?\d{4}$/,
'en-IN': /^(\+?91|0)?[789]\d{9}$/,
'en-NG': /^(\+?234|0)?[789]\d{9}$/,
'en-NZ': /^(\+?64|0)2\d{7,9}$/,
'en-ZA': /^(\+?27|0)\d{9}$/,
'en-ZM': /^(\+?26)?09[567]\d{7}$/,
Expand Down Expand Up @@ -62,4 +63,4 @@ function isMobilePhone(str, locale) {
}
return false;
}
module.exports = exports['default'];
module.exports = exports['default'];

0 comments on commit d7fa323

Please sign in to comment.