From b17de7b4924f0547c74e52c1b8342c4b5737907a Mon Sep 17 00:00:00 2001 From: Tomas Castro Date: Mon, 25 Nov 2024 11:28:24 +0100 Subject: [PATCH] Add extra digit on Oman country code --- src/lib/isMobilePhone.js | 2 +- test/validators.test.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/isMobilePhone.js b/src/lib/isMobilePhone.js index 393ee6fbd..c85a30153 100644 --- a/src/lib/isMobilePhone.js +++ b/src/lib/isMobilePhone.js @@ -13,7 +13,7 @@ const phones = { 'ar-KW': /^(\+?965)([569]\d{7}|41\d{6})$/, 'ar-LY': /^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/, 'ar-MA': /^(?:(?:\+|00)212|0)[5-7]\d{8}$/, - 'ar-OM': /^((\+|00)968)?(9[1-9])\d{6}$/, + 'ar-OM': /^((\+|00)968)?([79][1-9])\d{6}$/, 'ar-PS': /^(\+?970|0)5[6|9](\d{7})$/, 'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/, 'ar-SD': /^((\+?249)|0)?(9[012369]|1[012])\d{7}$/, diff --git a/test/validators.test.js b/test/validators.test.js index aa13906b0..abc17aa07 100644 --- a/test/validators.test.js +++ b/test/validators.test.js @@ -7520,6 +7520,7 @@ describe('Validators', () => { locale: 'ar-OM', valid: [ '+96891212121', + '+96871212121', '0096899999999', '93112211', '99099009',