Skip to content

Commit

Permalink
updated MobilePhone.js issue validatorjs#1761
Browse files Browse the repository at this point in the history
Added mobile phone code for Canada
  • Loading branch information
ATodd1 committed Mar 15, 2024
1 parent d04c507 commit 61624ba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/isMobilePhone.js
Expand Up @@ -160,6 +160,7 @@ const phones = {
'ar-EH': /^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,
'fa-AF': /^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/,
// this is where I will add the new number
'en-CA': /^((\+?1-?)|0)?[2-9]([0-9]{2})?[2-9]\d{6}$/,
};
/* eslint-enable max-len */

Expand Down

0 comments on commit 61624ba

Please sign in to comment.