From d7fa3239952a7e510f1d94eb2740912526fbb515 Mon Sep 17 00:00:00 2001 From: Bernard Ojengwa Date: Tue, 24 Jan 2017 16:21:37 +0100 Subject: [PATCH] Update isMobilePhone.js Add support for Nigerian phone numbers. --- lib/isMobilePhone.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/isMobilePhone.js b/lib/isMobilePhone.js index 2b1113002..72aa9e0a7 100644 --- a/lib/isMobilePhone.js +++ b/lib/isMobilePhone.js @@ -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}$/, @@ -62,4 +63,4 @@ function isMobilePhone(str, locale) { } return false; } -module.exports = exports['default']; \ No newline at end of file +module.exports = exports['default'];