Created
October 26, 2022 03:24
-
-
Save trangsihung/cf9f4ba840d5b104da56ee4421ae1f64 to your computer and use it in GitHub Desktop.
Check đầu số di động việt nam
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 characters
function checkPhoneFormat (phone) { | |
var prefix = [ | |
'086', | |
'096', | |
'097', | |
'098', | |
'032', | |
'033', | |
'034', | |
'035', | |
'036', | |
'037', | |
'038', | |
'039', // Viettel | |
'088', | |
'091', | |
'094', | |
'083', | |
'084', | |
'085', | |
'081', | |
'082', // VinaPhone | |
'089', | |
'090', | |
'093', | |
'070', | |
'079', | |
'077', | |
'076', | |
'078', // MobiFone | |
'092', | |
'056', | |
'058', // Vietnamobile | |
'099', | |
'059', // Gmobile | |
'087', // Itelecom | |
] | |
var phonePrefix = phone.substring(0, 3) | |
return prefix.includes(phonePrefix) | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment