Last active
August 7, 2025 11:59
-
-
Save tungvn/2460c5ba947e5cbe6606c5e85249cf04 to your computer and use it in GitHub Desktop.
Revisions
-
tungvn revised this gist
Dec 16, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ /* Before Septemper 15 2018, Vietnam has phone number start with 09*, 01(2|6|8|9). After that, the phone number can start with 03, 05, 07 or 08. So this function provide a way to validate the input number is a Vietnamese phone number */ function isVietnamesePhoneNumber(number) { return /(03|05|07|08|09|01[2|6|8|9])+([0-9]{8})\b/.test(number); } -
tungvn created this gist
Oct 25, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ /* Before Septemper 15 2018, Vietnam has phone number start with 09*, 01(2|6|8|9). After that, the phone number can start with 03, 07 or 08. So this function provide a way to validate the input number is a Vietnamese phone number */ function isVietnamesePhoneNumber(number) { return /(03|07|08|09|01[2|6|8|9])+([0-9]{8})\b/.test(number); }