Comparing version 0.0.5 to 0.0.6
554
lib/index.js
var iso3166_data = [ | ||
{"alpha2": "AW", "alpha3": "ABW", "country_code": "297", "phone_number_lengths": [7], "validation_begin_with": ["5", "6", "7", "9"]}, | ||
{"alpha2": "AF", "alpha3": "AFG", "country_code": "93", "phone_number_lengths": [9], "validation_begin_with": ["7"]}, | ||
{"alpha2": "AO", "alpha3": "AGO", "country_code": "244", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "AI", "alpha3": "AIA", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": ["5", "7"]}, | ||
{"alpha2": "AX", "alpha3": "ALA", "country_code": "358", "phone_number_lengths": [6, 7, 8], "validation_begin_with": ["18"]}, | ||
{"alpha2": "AL", "alpha3": "ALB", "country_code": "355", "phone_number_lengths": [8], "validation_begin_with": ["6"]}, | ||
{"alpha2": "AD", "alpha3": "AND", "country_code": "376", "phone_number_lengths": [6], "validation_begin_with": ["3", "4", "6"]}, | ||
{"alpha2": "AN", "alpha3": "ANT", "country_code": "599", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "AE", "alpha3": "ARE", "country_code": "971", "phone_number_lengths": [9], "validation_begin_with": ["5"]}, | ||
{"alpha2": "AR", "alpha3": "ARG", "country_code": "54", "phone_number_lengths": [10], "validation_begin_with": []}, | ||
{"alpha2": "AM", "alpha3": "ARM", "country_code": "374", "phone_number_lengths": [8], "validation_begin_with": ["5", "7", "9"]}, | ||
{"alpha2": "AS", "alpha3": "ASM", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": ["733", "258"]}, | ||
{"alpha2": "AQ", "alpha3": "ATA", "country_code": "672", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "TF", "alpha3": "ATF", "country_code": "", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "AG", "alpha3": "ATG", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": ["4", "7"]}, | ||
{"alpha2": "AU", "alpha3": "AUS", "country_code": "61", "phone_number_lengths": [9], "validation_begin_with": ["4"]}, | ||
{"alpha2": "AT", "alpha3": "AUT", "country_code": "43", "phone_number_lengths": [10], "validation_begin_with": ["6"]}, | ||
{"alpha2": "AZ", "alpha3": "AZE", "country_code": "994", "phone_number_lengths": [9], "validation_begin_with": ["4", "5", "6", "7"]}, | ||
{"alpha2": "BI", "alpha3": "BDI", "country_code": "257", "phone_number_lengths": [8], "validation_begin_with": ["7", "29"]}, | ||
{"alpha2": "BE", "alpha3": "BEL", "country_code": "32", "phone_number_lengths": [9], "validation_begin_with": ["4"]}, | ||
{"alpha2": "BJ", "alpha3": "BEN", "country_code": "229", "phone_number_lengths": [8], "validation_begin_with": ["9"]}, | ||
{"alpha2": "BF", "alpha3": "BFA", "country_code": "226", "phone_number_lengths": [8], "validation_begin_with": ["6", "7"]}, | ||
{"alpha2": "BD", "alpha3": "BGD", "country_code": "880", "phone_number_lengths": [8, 9, 10], "validation_begin_with": ["1"]}, | ||
{"alpha2": "BG", "alpha3": "BGR", "country_code": "359", "phone_number_lengths": [8, 9], "validation_begin_with": ["87", "88", "89", "98", "99", "43"]}, | ||
{"alpha2": "BH", "alpha3": "BHR", "country_code": "973", "phone_number_lengths": [8], "validation_begin_with": ["3"]}, | ||
{"alpha2": "BS", "alpha3": "BHS", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": ["3", "4", "5", "6", "7"]}, | ||
{"alpha2": "BA", "alpha3": "BIH", "country_code": "387", "phone_number_lengths": [8], "validation_begin_with": ["6"]}, | ||
{"alpha2": "BL", "alpha3": "BLM", "country_code": "590", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "BY", "alpha3": "BLR", "country_code": "375", "phone_number_lengths": [9], "validation_begin_with": ["25", "29", "33", "44"]}, | ||
{"alpha2": "BZ", "alpha3": "BLZ", "country_code": "501", "phone_number_lengths": [7], "validation_begin_with": ["6"]}, | ||
{"alpha2": "BM", "alpha3": "BMU", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": ["3", "5", "7"]}, | ||
{"alpha2": "BO", "alpha3": "BOL", "country_code": "591", "phone_number_lengths": [8], "validation_begin_with": ["7"]}, | ||
{"alpha2": "BR", "alpha3": "BRA", "country_code": "55", "phone_number_lengths": [10, 11], "validation_begin_with": []}, | ||
{"alpha2": "BB", "alpha3": "BRB", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "BN", "alpha3": "BRN", "country_code": "673", "phone_number_lengths": [7], "validation_begin_with": ["7", "8"]}, | ||
{"alpha2": "BT", "alpha3": "BTN", "country_code": "975", "phone_number_lengths": [8], "validation_begin_with": ["17"]}, | ||
{"alpha2": "BV", "alpha3": "BVT", "country_code": "", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "BW", "alpha3": "BWA", "country_code": "267", "phone_number_lengths": [8], "validation_begin_with": ["71", "72", "73", "74", "75", "76"]}, | ||
{"alpha2": "CF", "alpha3": "CAF", "country_code": "236", "phone_number_lengths": [8], "validation_begin_with": ["7"]}, | ||
{"alpha2": "AW", "alpha3": "ABW", "country_code": "297", "phone_number_lengths": [7], "mobile_begin_with": ["5", "6", "7", "9"]}, | ||
{"alpha2": "AF", "alpha3": "AFG", "country_code": "93", "phone_number_lengths": [9], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "AO", "alpha3": "AGO", "country_code": "244", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "AI", "alpha3": "AIA", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": ["5", "7"]}, | ||
{"alpha2": "AX", "alpha3": "ALA", "country_code": "358", "phone_number_lengths": [6, 7, 8], "mobile_begin_with": ["18"]}, | ||
{"alpha2": "AL", "alpha3": "ALB", "country_code": "355", "phone_number_lengths": [8], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "AD", "alpha3": "AND", "country_code": "376", "phone_number_lengths": [6], "mobile_begin_with": ["3", "4", "6"]}, | ||
{"alpha2": "AN", "alpha3": "ANT", "country_code": "599", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "AE", "alpha3": "ARE", "country_code": "971", "phone_number_lengths": [9], "mobile_begin_with": ["5"]}, | ||
{"alpha2": "AR", "alpha3": "ARG", "country_code": "54", "phone_number_lengths": [10], "mobile_begin_with": []}, | ||
{"alpha2": "AM", "alpha3": "ARM", "country_code": "374", "phone_number_lengths": [8], "mobile_begin_with": ["5", "7", "9"]}, | ||
{"alpha2": "AS", "alpha3": "ASM", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": ["733", "258"]}, | ||
{"alpha2": "AQ", "alpha3": "ATA", "country_code": "672", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "TF", "alpha3": "ATF", "country_code": "", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "AG", "alpha3": "ATG", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": ["4", "7"]}, | ||
{"alpha2": "AU", "alpha3": "AUS", "country_code": "61", "phone_number_lengths": [9], "mobile_begin_with": ["4"]}, | ||
{"alpha2": "AT", "alpha3": "AUT", "country_code": "43", "phone_number_lengths": [10], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "AZ", "alpha3": "AZE", "country_code": "994", "phone_number_lengths": [9], "mobile_begin_with": ["4", "5", "6", "7"]}, | ||
{"alpha2": "BI", "alpha3": "BDI", "country_code": "257", "phone_number_lengths": [8], "mobile_begin_with": ["7", "29"]}, | ||
{"alpha2": "BE", "alpha3": "BEL", "country_code": "32", "phone_number_lengths": [9], "mobile_begin_with": ["4"]}, | ||
{"alpha2": "BJ", "alpha3": "BEN", "country_code": "229", "phone_number_lengths": [8], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "BF", "alpha3": "BFA", "country_code": "226", "phone_number_lengths": [8], "mobile_begin_with": ["6", "7"]}, | ||
{"alpha2": "BD", "alpha3": "BGD", "country_code": "880", "phone_number_lengths": [8, 9, 10], "mobile_begin_with": ["1"]}, | ||
{"alpha2": "BG", "alpha3": "BGR", "country_code": "359", "phone_number_lengths": [8, 9], "mobile_begin_with": ["87", "88", "89", "98", "99", "43"]}, | ||
{"alpha2": "BH", "alpha3": "BHR", "country_code": "973", "phone_number_lengths": [8], "mobile_begin_with": ["3"]}, | ||
{"alpha2": "BS", "alpha3": "BHS", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": ["3", "4", "5", "6", "7"]}, | ||
{"alpha2": "BA", "alpha3": "BIH", "country_code": "387", "phone_number_lengths": [8], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "BL", "alpha3": "BLM", "country_code": "590", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "BY", "alpha3": "BLR", "country_code": "375", "phone_number_lengths": [9], "mobile_begin_with": ["25", "29", "33", "44"]}, | ||
{"alpha2": "BZ", "alpha3": "BLZ", "country_code": "501", "phone_number_lengths": [7], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "BM", "alpha3": "BMU", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": ["3", "5", "7"]}, | ||
{"alpha2": "BO", "alpha3": "BOL", "country_code": "591", "phone_number_lengths": [8], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "BR", "alpha3": "BRA", "country_code": "55", "phone_number_lengths": [10, 11], "mobile_begin_with": []}, | ||
{"alpha2": "BB", "alpha3": "BRB", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "BN", "alpha3": "BRN", "country_code": "673", "phone_number_lengths": [7], "mobile_begin_with": ["7", "8"]}, | ||
{"alpha2": "BT", "alpha3": "BTN", "country_code": "975", "phone_number_lengths": [8], "mobile_begin_with": ["17"]}, | ||
{"alpha2": "BV", "alpha3": "BVT", "country_code": "", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "BW", "alpha3": "BWA", "country_code": "267", "phone_number_lengths": [8], "mobile_begin_with": ["71", "72", "73", "74", "75", "76"]}, | ||
{"alpha2": "CF", "alpha3": "CAF", "country_code": "236", "phone_number_lengths": [8], "mobile_begin_with": ["7"]}, | ||
// http://www.howtocallabroad.com/canada/ | ||
// http://areacode.org/ | ||
// http://countrycode.org/canada | ||
{"alpha2": "CA", "alpha3": "CAN", "country_code": "1", "phone_number_lengths": [10], | ||
"validation_begin_with": ["204", "226", "236", "249", "250", "289", "306", "343", "365", "387", "403", "416", | ||
"418", "431", "437", "438", "450", "506", "514", "519", "579", "581", "587", "604", "613", "639", "647", | ||
"672", "705", "709", "742", "778", "780", "807", "819", "825", "867", "873", "902", "905"]}, | ||
{"alpha2": "CC", "alpha3": "CCK", "country_code": "61", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "CH", "alpha3": "CHE", "country_code": "41", "phone_number_lengths": [9], "validation_begin_with": ["7"]}, | ||
{"alpha2": "CL", "alpha3": "CHL", "country_code": "56", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "CN", "alpha3": "CHN", "country_code": "86", "phone_number_lengths": [11], "validation_begin_with": ["13", "14", "15", "18"]}, | ||
{"alpha2": "CI", "alpha3": "CIV", "country_code": "225", "phone_number_lengths": [8], "validation_begin_with": ["0", "4", "5", "6"]}, | ||
{"alpha2": "CM", "alpha3": "CMR", "country_code": "237", "phone_number_lengths": [8], "validation_begin_with": ["7", "9"]}, | ||
{"alpha2": "CD", "alpha3": "COD", "country_code": "243", "phone_number_lengths": [9], "validation_begin_with": ["8", "9"]}, | ||
{"alpha2": "CG", "alpha3": "COG", "country_code": "242", "phone_number_lengths": [9], "validation_begin_with": ["0"]}, | ||
{"alpha2": "CK", "alpha3": "COK", "country_code": "682", "phone_number_lengths": [5], "validation_begin_with": ["5", "7"]}, | ||
{"alpha2": "CO", "alpha3": "COL", "country_code": "57", "phone_number_lengths": [10], "validation_begin_with": ["3"]}, | ||
{"alpha2": "KM", "alpha3": "COM", "country_code": "269", "phone_number_lengths": [7], "validation_begin_with": ["3", "76"]}, | ||
{"alpha2": "CV", "alpha3": "CPV", "country_code": "238", "phone_number_lengths": [7], "validation_begin_with": ["5", "9"]}, | ||
{"alpha2": "CR", "alpha3": "CRI", "country_code": "506", "phone_number_lengths": [8], "validation_begin_with": ["5", "6", "7", "8"]}, | ||
{"alpha2": "CU", "alpha3": "CUB", "country_code": "53", "phone_number_lengths": [8], "validation_begin_with": ["5"]}, | ||
{"alpha2": "CX", "alpha3": "CXR", "country_code": "61", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "KY", "alpha3": "CYM", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "CY", "alpha3": "CYP", "country_code": "357", "phone_number_lengths": [8], "validation_begin_with": ["9"]}, | ||
{"alpha2": "CZ", "alpha3": "CZE", "country_code": "420", "phone_number_lengths": [9], "validation_begin_with": ["6", "7"]}, | ||
{"alpha2": "DE", "alpha3": "DEU", "country_code": "49", "phone_number_lengths": [10, 11], "validation_begin_with": ["15", "16", "17"]}, | ||
{"alpha2": "DJ", "alpha3": "DJI", "country_code": "253", "phone_number_lengths": [8], "validation_begin_with": ["77"]}, | ||
{"alpha2": "DM", "alpha3": "DMA", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "DK", "alpha3": "DNK", "country_code": "45", "phone_number_lengths": [8], "validation_begin_with": []}, | ||
{"alpha2": "DO", "alpha3": "DOM", "country_code": "1", "phone_number_lengths": [10], "validation_begin_with": ["809", "829", "849"]}, | ||
{"alpha2": "DZ", "alpha3": "DZA", "country_code": "213", "phone_number_lengths": [9], "validation_begin_with": ["5", "6", "7"]}, | ||
{"alpha2": "EC", "alpha3": "ECU", "country_code": "593", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "EG", "alpha3": "EGY", "country_code": "20", "phone_number_lengths": [10], "validation_begin_with": ["1"]}, | ||
{"alpha2": "ER", "alpha3": "ERI", "country_code": "291", "phone_number_lengths": [7], "validation_begin_with": ["1", "7", "8"]}, | ||
{"alpha2": "EH", "alpha3": "ESH", "country_code": "212", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "ES", "alpha3": "ESP", "country_code": "34", "phone_number_lengths": [9], "validation_begin_with": ["6", "7"]}, | ||
{"alpha2": "EE", "alpha3": "EST", "country_code": "372", "phone_number_lengths": [8], "validation_begin_with": ["5"]}, | ||
{"alpha2": "ET", "alpha3": "ETH", "country_code": "251", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "FI", "alpha3": "FIN", "country_code": "358", "phone_number_lengths": [9], "validation_begin_with": ["4", "5"]}, | ||
{"alpha2": "FJ", "alpha3": "FJI", "country_code": "679", "phone_number_lengths": [7], "validation_begin_with": ["7", "9"]}, | ||
{"alpha2": "FK", "alpha3": "FLK", "country_code": "500", "phone_number_lengths": [5], "validation_begin_with": ["5", "6"]}, | ||
{"alpha2": "FR", "alpha3": "FRA", "country_code": "33", "phone_number_lengths": [9], "validation_begin_with": ["6"]}, | ||
{"alpha2": "FO", "alpha3": "FRO", "country_code": "298", "phone_number_lengths": [6], "validation_begin_with": []}, | ||
{"alpha2": "FM", "alpha3": "FSM", "country_code": "691", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "GA", "alpha3": "GAB", "country_code": "241", "phone_number_lengths": [8], "validation_begin_with": ["05", "06", "07"]}, | ||
"mobile_begin_with": ["204", "226", "236", "249", "250", "289", "306", "343", "365", "403", "416", "418", | ||
"431", "437", "438", "450", "506", "514", "519", "579", "581", "587", "600", "604", "613", "639", "647", | ||
"705", "709", "778", "780", "807", "819", "867", "873", "902", "905"]}, | ||
{"alpha2": "CC", "alpha3": "CCK", "country_code": "61", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "CH", "alpha3": "CHE", "country_code": "41", "phone_number_lengths": [9], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "CL", "alpha3": "CHL", "country_code": "56", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "CN", "alpha3": "CHN", "country_code": "86", "phone_number_lengths": [11], "mobile_begin_with": ["13", "14", "15", "18"]}, | ||
{"alpha2": "CI", "alpha3": "CIV", "country_code": "225", "phone_number_lengths": [8], "mobile_begin_with": ["0", "4", "5", "6"]}, | ||
{"alpha2": "CM", "alpha3": "CMR", "country_code": "237", "phone_number_lengths": [8], "mobile_begin_with": ["7", "9"]}, | ||
{"alpha2": "CD", "alpha3": "COD", "country_code": "243", "phone_number_lengths": [9], "mobile_begin_with": ["8", "9"]}, | ||
{"alpha2": "CG", "alpha3": "COG", "country_code": "242", "phone_number_lengths": [9], "mobile_begin_with": ["0"]}, | ||
{"alpha2": "CK", "alpha3": "COK", "country_code": "682", "phone_number_lengths": [5], "mobile_begin_with": ["5", "7"]}, | ||
{"alpha2": "CO", "alpha3": "COL", "country_code": "57", "phone_number_lengths": [10], "mobile_begin_with": ["3"]}, | ||
{"alpha2": "KM", "alpha3": "COM", "country_code": "269", "phone_number_lengths": [7], "mobile_begin_with": ["3", "76"]}, | ||
{"alpha2": "CV", "alpha3": "CPV", "country_code": "238", "phone_number_lengths": [7], "mobile_begin_with": ["5", "9"]}, | ||
{"alpha2": "CR", "alpha3": "CRI", "country_code": "506", "phone_number_lengths": [8], "mobile_begin_with": ["5", "6", "7", "8"]}, | ||
{"alpha2": "CU", "alpha3": "CUB", "country_code": "53", "phone_number_lengths": [8], "mobile_begin_with": ["5"]}, | ||
{"alpha2": "CX", "alpha3": "CXR", "country_code": "61", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "KY", "alpha3": "CYM", "country_code": "1", "phone_number_lengths": [10], "mobile_begin_with": ["345"]}, | ||
{"alpha2": "CY", "alpha3": "CYP", "country_code": "357", "phone_number_lengths": [8], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "CZ", "alpha3": "CZE", "country_code": "420", "phone_number_lengths": [9], "mobile_begin_with": ["6", "7"]}, | ||
{"alpha2": "DE", "alpha3": "DEU", "country_code": "49", "phone_number_lengths": [10, 11], "mobile_begin_with": ["15", "16", "17"]}, | ||
{"alpha2": "DJ", "alpha3": "DJI", "country_code": "253", "phone_number_lengths": [8], "mobile_begin_with": ["77"]}, | ||
{"alpha2": "DM", "alpha3": "DMA", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "DK", "alpha3": "DNK", "country_code": "45", "phone_number_lengths": [8], "mobile_begin_with": []}, | ||
{"alpha2": "DO", "alpha3": "DOM", "country_code": "1", "phone_number_lengths": [10], "mobile_begin_with": ["809", "829", "849"]}, | ||
{"alpha2": "DZ", "alpha3": "DZA", "country_code": "213", "phone_number_lengths": [9], "mobile_begin_with": ["5", "6", "7"]}, | ||
{"alpha2": "EC", "alpha3": "ECU", "country_code": "593", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "EG", "alpha3": "EGY", "country_code": "20", "phone_number_lengths": [10], "mobile_begin_with": ["1"]}, | ||
{"alpha2": "ER", "alpha3": "ERI", "country_code": "291", "phone_number_lengths": [7], "mobile_begin_with": ["1", "7", "8"]}, | ||
{"alpha2": "EH", "alpha3": "ESH", "country_code": "212", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "ES", "alpha3": "ESP", "country_code": "34", "phone_number_lengths": [9], "mobile_begin_with": ["6", "7"]}, | ||
{"alpha2": "EE", "alpha3": "EST", "country_code": "372", "phone_number_lengths": [8], "mobile_begin_with": ["5"]}, | ||
{"alpha2": "ET", "alpha3": "ETH", "country_code": "251", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "FI", "alpha3": "FIN", "country_code": "358", "phone_number_lengths": [9], "mobile_begin_with": ["4", "5"]}, | ||
{"alpha2": "FJ", "alpha3": "FJI", "country_code": "679", "phone_number_lengths": [7], "mobile_begin_with": ["7", "9"]}, | ||
{"alpha2": "FK", "alpha3": "FLK", "country_code": "500", "phone_number_lengths": [5], "mobile_begin_with": ["5", "6"]}, | ||
{"alpha2": "FR", "alpha3": "FRA", "country_code": "33", "phone_number_lengths": [9], "mobile_begin_with": ["6", "7"]}, | ||
{"alpha2": "FO", "alpha3": "FRO", "country_code": "298", "phone_number_lengths": [6], "mobile_begin_with": []}, | ||
{"alpha2": "FM", "alpha3": "FSM", "country_code": "691", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "GA", "alpha3": "GAB", "country_code": "241", "phone_number_lengths": [8], "mobile_begin_with": ["05", "06", "07"]}, | ||
//http://www.area-codes.org.uk/ http://www.area-codes.org.uk/07-mobile-codes.php | ||
{"alpha2": "GB", "alpha3": "GBR", "country_code": "44", "phone_number_lengths": [10], "validation_begin_with": ["7"]}, | ||
{"alpha2": "GE", "alpha3": "GEO", "country_code": "995", "phone_number_lengths": [9], "validation_begin_with": ["5", "7"]}, | ||
{"alpha2": "GG", "alpha3": "GGY", "country_code": "44", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "GH", "alpha3": "GHA", "country_code": "233", "phone_number_lengths": [9], "validation_begin_with": ["2", "5"]}, | ||
{"alpha2": "GI", "alpha3": "GIB", "country_code": "350", "phone_number_lengths": [8], "validation_begin_with": ["5"]}, | ||
{"alpha2": "GN", "alpha3": "GIN", "country_code": "224", "phone_number_lengths": [8], "validation_begin_with": ["6"]}, | ||
{"alpha2": "GP", "alpha3": "GLP", "country_code": "590", "phone_number_lengths": [9], "validation_begin_with": ["690"]}, | ||
{"alpha2": "GM", "alpha3": "GMB", "country_code": "220", "phone_number_lengths": [7], "validation_begin_with": ["7", "9"]}, | ||
{"alpha2": "GW", "alpha3": "GNB", "country_code": "245", "phone_number_lengths": [7], "validation_begin_with": ["5", "6", "7"]}, | ||
{"alpha2": "GQ", "alpha3": "GNQ", "country_code": "240", "phone_number_lengths": [9], "validation_begin_with": ["222", "551"]}, | ||
{"alpha2": "GR", "alpha3": "GRC", "country_code": "30", "phone_number_lengths": [10], "validation_begin_with": ["6"]}, | ||
{"alpha2": "GD", "alpha3": "GRD", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "GL", "alpha3": "GRL", "country_code": "299", "phone_number_lengths": [6], "validation_begin_with": ["4", "5"]}, | ||
{"alpha2": "GT", "alpha3": "GTM", "country_code": "502", "phone_number_lengths": [8], "validation_begin_with": ["3", "4", "5"]}, | ||
{"alpha2": "GF", "alpha3": "GUF", "country_code": "594", "phone_number_lengths": [9], "validation_begin_with": ["694"]}, | ||
{"alpha2": "GU", "alpha3": "GUM", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "GY", "alpha3": "GUY", "country_code": "592", "phone_number_lengths": [7], "validation_begin_with": ["6"]}, | ||
{"alpha2": "HK", "alpha3": "HKG", "country_code": "852", "phone_number_lengths": [8], "validation_begin_with": ["5", "6", "9"]}, | ||
{"alpha2": "HM", "alpha3": "HMD", "country_code": "", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "HN", "alpha3": "HND", "country_code": "504", "phone_number_lengths": [8], "validation_begin_with": ["3", "7", "8", "9"]}, | ||
{"alpha2": "HR", "alpha3": "HRV", "country_code": "385", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "HT", "alpha3": "HTI", "country_code": "509", "phone_number_lengths": [8], "validation_begin_with": ["3", "4"]}, | ||
{"alpha2": "HU", "alpha3": "HUN", "country_code": "36", "phone_number_lengths": [9], "validation_begin_with": ["20", "30", "31", "70"]}, | ||
{"alpha2": "ID", "alpha3": "IDN", "country_code": "62", "phone_number_lengths": [9, 10, 11], "validation_begin_with": ["8"]}, | ||
{"alpha2": "IM", "alpha3": "IMN", "country_code": "44", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "IN", "alpha3": "IND", "country_code": "91", "phone_number_lengths": [10], "validation_begin_with": ["7", "8", "9"]}, | ||
{"alpha2": "IO", "alpha3": "IOT", "country_code": "246", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "IE", "alpha3": "IRL", "country_code": "353", "phone_number_lengths": [9], "validation_begin_with": ["82", "83", "84", "85", "86", "87", "88", "89"]}, | ||
{"alpha2": "IR", "alpha3": "IRN", "country_code": "98", "phone_number_lengths": [10], "validation_begin_with": ["9"]}, | ||
{"alpha2": "IQ", "alpha3": "IRQ", "country_code": "964", "phone_number_lengths": [10], "validation_begin_with": ["7"]}, | ||
{"alpha2": "GB", "alpha3": "GBR", "country_code": "44", "phone_number_lengths": [10], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "GE", "alpha3": "GEO", "country_code": "995", "phone_number_lengths": [9], "mobile_begin_with": ["5", "7"]}, | ||
{"alpha2": "GG", "alpha3": "GGY", "country_code": "44", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "GH", "alpha3": "GHA", "country_code": "233", "phone_number_lengths": [9], "mobile_begin_with": ["2", "5"]}, | ||
{"alpha2": "GI", "alpha3": "GIB", "country_code": "350", "phone_number_lengths": [8], "mobile_begin_with": ["5"]}, | ||
{"alpha2": "GN", "alpha3": "GIN", "country_code": "224", "phone_number_lengths": [8], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "GP", "alpha3": "GLP", "country_code": "590", "phone_number_lengths": [9], "mobile_begin_with": ["690"]}, | ||
{"alpha2": "GM", "alpha3": "GMB", "country_code": "220", "phone_number_lengths": [7], "mobile_begin_with": ["7", "9"]}, | ||
{"alpha2": "GW", "alpha3": "GNB", "country_code": "245", "phone_number_lengths": [7], "mobile_begin_with": ["5", "6", "7"]}, | ||
{"alpha2": "GQ", "alpha3": "GNQ", "country_code": "240", "phone_number_lengths": [9], "mobile_begin_with": ["222", "551"]}, | ||
{"alpha2": "GR", "alpha3": "GRC", "country_code": "30", "phone_number_lengths": [10], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "GD", "alpha3": "GRD", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "GL", "alpha3": "GRL", "country_code": "299", "phone_number_lengths": [6], "mobile_begin_with": ["4", "5"]}, | ||
{"alpha2": "GT", "alpha3": "GTM", "country_code": "502", "phone_number_lengths": [8], "mobile_begin_with": ["3", "4", "5"]}, | ||
{"alpha2": "GF", "alpha3": "GUF", "country_code": "594", "phone_number_lengths": [9], "mobile_begin_with": ["694"]}, | ||
{"alpha2": "GU", "alpha3": "GUM", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "GY", "alpha3": "GUY", "country_code": "592", "phone_number_lengths": [7], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "HK", "alpha3": "HKG", "country_code": "852", "phone_number_lengths": [8], "mobile_begin_with": ["5", "6", "9"]}, | ||
{"alpha2": "HM", "alpha3": "HMD", "country_code": "", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "HN", "alpha3": "HND", "country_code": "504", "phone_number_lengths": [8], "mobile_begin_with": ["3", "7", "8", "9"]}, | ||
{"alpha2": "HR", "alpha3": "HRV", "country_code": "385", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "HT", "alpha3": "HTI", "country_code": "509", "phone_number_lengths": [8], "mobile_begin_with": ["3", "4"]}, | ||
{"alpha2": "HU", "alpha3": "HUN", "country_code": "36", "phone_number_lengths": [9], "mobile_begin_with": ["20", "30", "31", "70"]}, | ||
{"alpha2": "ID", "alpha3": "IDN", "country_code": "62", "phone_number_lengths": [9, 10, 11], "mobile_begin_with": ["8"]}, | ||
{"alpha2": "IM", "alpha3": "IMN", "country_code": "44", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "IN", "alpha3": "IND", "country_code": "91", "phone_number_lengths": [10], "mobile_begin_with": ["7", "8", "9"]}, | ||
{"alpha2": "IO", "alpha3": "IOT", "country_code": "246", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "IE", "alpha3": "IRL", "country_code": "353", "phone_number_lengths": [9], "mobile_begin_with": ["82", "83", "84", "85", "86", "87", "88", "89"]}, | ||
{"alpha2": "IR", "alpha3": "IRN", "country_code": "98", "phone_number_lengths": [10], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "IQ", "alpha3": "IRQ", "country_code": "964", "phone_number_lengths": [10], "mobile_begin_with": ["7"]}, | ||
// Iceland only have 7 digits, no more area code for mobile | ||
{"alpha2": "IS", "alpha3": "ISL", "country_code": "354", "phone_number_lengths": [7], "validation_begin_with": ["6", "7", "8"]}, | ||
{"alpha2": "IL", "alpha3": "ISR", "country_code": "972", "phone_number_lengths": [9], "validation_begin_with": ["5"]}, | ||
{"alpha2": "IT", "alpha3": "ITA", "country_code": "39", "phone_number_lengths": [10], "validation_begin_with": ["3"]}, | ||
{"alpha2": "JM", "alpha3": "JAM", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "JE", "alpha3": "JEY", "country_code": "44", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "JO", "alpha3": "JOR", "country_code": "962", "phone_number_lengths": [9], "validation_begin_with": ["7"]}, | ||
{"alpha2": "JP", "alpha3": "JPN", "country_code": "81", "phone_number_lengths": [10], "validation_begin_with": ["70", "80", "90"]}, | ||
{"alpha2": "KZ", "alpha3": "KAZ", "country_code": "7", "phone_number_lengths": [10], "validation_begin_with": ["70", "77"]}, | ||
{"alpha2": "KE", "alpha3": "KEN", "country_code": "254", "phone_number_lengths": [9], "validation_begin_with": ["7"]}, | ||
{"alpha2": "KG", "alpha3": "KGZ", "country_code": "996", "phone_number_lengths": [9], "validation_begin_with": ["5", "7"]}, | ||
{"alpha2": "KH", "alpha3": "KHM", "country_code": "855", "phone_number_lengths": [8, 9], "validation_begin_with": ["1", "6", "7", "8", "9"]}, | ||
{"alpha2": "KI", "alpha3": "KIR", "country_code": "686", "phone_number_lengths": [5], "validation_begin_with": ["9", "30"]}, | ||
{"alpha2": "KN", "alpha3": "KNA", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "KR", "alpha3": "KOR", "country_code": "82", "phone_number_lengths": [9, 10], "validation_begin_with": ["1"]}, | ||
{"alpha2": "KW", "alpha3": "KWT", "country_code": "965", "phone_number_lengths": [8], "validation_begin_with": ["5", "6", "9"]}, | ||
{"alpha2": "LA", "alpha3": "LAO", "country_code": "856", "phone_number_lengths": [10], "validation_begin_with": ["20"]}, | ||
{"alpha2": "LB", "alpha3": "LBN", "country_code": "961", "phone_number_lengths": [7, 8], "validation_begin_with": ["3", "7"]}, | ||
{"alpha2": "LR", "alpha3": "LBR", "country_code": "231", "phone_number_lengths": [7, 8], "validation_begin_with": ["4", "5", "6", "7"]}, | ||
{"alpha2": "LY", "alpha3": "LBY", "country_code": "218", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "LC", "alpha3": "LCA", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "LI", "alpha3": "LIE", "country_code": "423", "phone_number_lengths": [7], "validation_begin_with": ["7"]}, | ||
{"alpha2": "LK", "alpha3": "LKA", "country_code": "94", "phone_number_lengths": [9], "validation_begin_with": ["7"]}, | ||
{"alpha2": "LS", "alpha3": "LSO", "country_code": "266", "phone_number_lengths": [8], "validation_begin_with": ["5", "6"]}, | ||
{"alpha2": "LT", "alpha3": "LTU", "country_code": "370", "phone_number_lengths": [8], "validation_begin_with": ["6"]}, | ||
{"alpha2": "LU", "alpha3": "LUX", "country_code": "352", "phone_number_lengths": [9], "validation_begin_with": ["6"]}, | ||
{"alpha2": "LV", "alpha3": "LVA", "country_code": "371", "phone_number_lengths": [8], "validation_begin_with": ["2"]}, | ||
{"alpha2": "MO", "alpha3": "MAC", "country_code": "853", "phone_number_lengths": [8], "validation_begin_with": ["6"]}, | ||
{"alpha2": "MF", "alpha3": "MAF", "country_code": "590", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "MA", "alpha3": "MAR", "country_code": "212", "phone_number_lengths": [9], "validation_begin_with": ["6"]}, | ||
{"alpha2": "MC", "alpha3": "MCO", "country_code": "377", "phone_number_lengths": [8, 9], "validation_begin_with": ["4", "6"]}, | ||
{"alpha2": "MD", "alpha3": "MDA", "country_code": "373", "phone_number_lengths": [8], "validation_begin_with": ["6", "7"]}, | ||
{"alpha2": "MG", "alpha3": "MDG", "country_code": "261", "phone_number_lengths": [9], "validation_begin_with": ["3"]}, | ||
{"alpha2": "MV", "alpha3": "MDV", "country_code": "960", "phone_number_lengths": [7], "validation_begin_with": ["7", "9"]}, | ||
{"alpha2": "MX", "alpha3": "MEX", "country_code": "52", "phone_number_lengths": [11], "validation_begin_with": ["1"]}, | ||
{"alpha2": "MH", "alpha3": "MHL", "country_code": "692", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "MK", "alpha3": "MKD", "country_code": "389", "phone_number_lengths": [8], "validation_begin_with": ["7"]}, | ||
{"alpha2": "ML", "alpha3": "MLI", "country_code": "223", "phone_number_lengths": [8], "validation_begin_with": ["6", "7"]}, | ||
{"alpha2": "MT", "alpha3": "MLT", "country_code": "356", "phone_number_lengths": [8], "validation_begin_with": ["79", "99"]}, | ||
{"alpha2": "MM", "alpha3": "MMR", "country_code": "95", "phone_number_lengths": [8], "validation_begin_with": ["9"]}, | ||
{"alpha2": "ME", "alpha3": "MNE", "country_code": "382", "phone_number_lengths": [8], "validation_begin_with": ["6"]}, | ||
{"alpha2": "MN", "alpha3": "MNG", "country_code": "976", "phone_number_lengths": [8], "validation_begin_with": ["5", "8", "9"]}, | ||
{"alpha2": "MP", "alpha3": "MNP", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "MZ", "alpha3": "MOZ", "country_code": "258", "phone_number_lengths": [9], "validation_begin_with": ["8"]}, | ||
{"alpha2": "MR", "alpha3": "MRT", "country_code": "222", "phone_number_lengths": [8], "validation_begin_with": []}, | ||
{"alpha2": "MS", "alpha3": "MSR", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "MQ", "alpha3": "MTQ", "country_code": "596", "phone_number_lengths": [9], "validation_begin_with": ["696"]}, | ||
{"alpha2": "MU", "alpha3": "MUS", "country_code": "230", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "MW", "alpha3": "MWI", "country_code": "265", "phone_number_lengths": [9], "validation_begin_with": ["77", "88", "99"]}, | ||
{"alpha2": "MY", "alpha3": "MYS", "country_code": "60", "phone_number_lengths": [9, 10], "validation_begin_with": ["1"]}, | ||
{"alpha2": "YT", "alpha3": "MYT", "country_code": "269", "phone_number_lengths": [9], "validation_begin_with": ["639"]}, | ||
{"alpha2": "NA", "alpha3": "NAM", "country_code": "264", "phone_number_lengths": [9], "validation_begin_with": ["60", "81", "82", "85"]}, | ||
{"alpha2": "NC", "alpha3": "NCL", "country_code": "687", "phone_number_lengths": [6], "validation_begin_with": []}, | ||
{"alpha2": "NE", "alpha3": "NER", "country_code": "227", "phone_number_lengths": [8], "validation_begin_with": ["9"]}, | ||
{"alpha2": "NF", "alpha3": "NFK", "country_code": "672", "phone_number_lengths": [5], "validation_begin_with": ["5", "8"]}, | ||
{"alpha2": "NG", "alpha3": "NGA", "country_code": "234", "phone_number_lengths": [10], "validation_begin_with": ["70", "80", "81"]}, | ||
{"alpha2": "NI", "alpha3": "NIC", "country_code": "505", "phone_number_lengths": [8], "validation_begin_with": ["8"]}, | ||
{"alpha2": "NU", "alpha3": "NIU", "country_code": "683", "phone_number_lengths": [4], "validation_begin_with": []}, | ||
{"alpha2": "NL", "alpha3": "NLD", "country_code": "31", "phone_number_lengths": [9], "validation_begin_with": ["6"]}, | ||
{"alpha2": "NO", "alpha3": "NOR", "country_code": "47", "phone_number_lengths": [8], "validation_begin_with": ["4", "9"]}, | ||
{"alpha2": "NP", "alpha3": "NPL", "country_code": "977", "phone_number_lengths": [10], "validation_begin_with": ["97", "98"]}, | ||
{"alpha2": "NR", "alpha3": "NRU", "country_code": "674", "phone_number_lengths": [7], "validation_begin_with": ["555"]}, | ||
{"alpha2": "NZ", "alpha3": "NZL", "country_code": "64", "phone_number_lengths": [8, 9, 10], "validation_begin_with": ["2"]}, | ||
{"alpha2": "OM", "alpha3": "OMN", "country_code": "968", "phone_number_lengths": [8], "validation_begin_with": ["9"]}, | ||
{"alpha2": "PK", "alpha3": "PAK", "country_code": "92", "phone_number_lengths": [10], "validation_begin_with": ["3"]}, | ||
{"alpha2": "PA", "alpha3": "PAN", "country_code": "507", "phone_number_lengths": [8], "validation_begin_with": ["5", "6"]}, | ||
{"alpha2": "PN", "alpha3": "PCN", "country_code": "", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "PE", "alpha3": "PER", "country_code": "51", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "PH", "alpha3": "PHL", "country_code": "63", "phone_number_lengths": [10], "validation_begin_with": ["9"]}, | ||
{"alpha2": "PW", "alpha3": "PLW", "country_code": "680", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "PG", "alpha3": "PNG", "country_code": "675", "phone_number_lengths": [8], "validation_begin_with": ["7"]}, | ||
{"alpha2": "PL", "alpha3": "POL", "country_code": "48", "phone_number_lengths": [9], "validation_begin_with": ["5", "6", "7", "8"]}, | ||
{"alpha2": "PR", "alpha3": "PRI", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "KP", "alpha3": "PRK", "country_code": "850", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "PT", "alpha3": "PRT", "country_code": "351", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "PY", "alpha3": "PRY", "country_code": "595", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "PS", "alpha3": "PSE", "country_code": "970", "phone_number_lengths": [9], "validation_begin_with": ["5"]}, | ||
{"alpha2": "PF", "alpha3": "PYF", "country_code": "689", "phone_number_lengths": [6], "validation_begin_with": []}, | ||
{"alpha2": "QA", "alpha3": "QAT", "country_code": "974", "phone_number_lengths": [8], "validation_begin_with": ["33", "55", "66", "77"]}, | ||
{"alpha2": "RE", "alpha3": "REU", "country_code": "262", "phone_number_lengths": [9], "validation_begin_with": ["692", "693"]}, | ||
{"alpha2": "RO", "alpha3": "ROU", "country_code": "40", "phone_number_lengths": [9], "validation_begin_with": ["7"]}, | ||
{"alpha2": "RU", "alpha3": "RUS", "country_code": "7", "phone_number_lengths": [10], "validation_begin_with": ["9"]}, | ||
{"alpha2": "RW", "alpha3": "RWA", "country_code": "250", "phone_number_lengths": [9], "validation_begin_with": ["7"]}, | ||
{"alpha2": "SA", "alpha3": "SAU", "country_code": "966", "phone_number_lengths": [9], "validation_begin_with": ["5"]}, | ||
{"alpha2": "SD", "alpha3": "SDN", "country_code": "249", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "SN", "alpha3": "SEN", "country_code": "221", "phone_number_lengths": [9], "validation_begin_with": ["7"]}, | ||
{"alpha2": "SG", "alpha3": "SGP", "country_code": "65", "phone_number_lengths": [8], "validation_begin_with": ["8", "9"]}, | ||
{"alpha2": "GS", "alpha3": "SGS", "country_code": "500", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "SH", "alpha3": "SHN", "country_code": "290", "phone_number_lengths": [4], "validation_begin_with": []}, | ||
{"alpha2": "SJ", "alpha3": "SJM", "country_code": "47", "phone_number_lengths": [8], "validation_begin_with": []}, | ||
{"alpha2": "SB", "alpha3": "SLB", "country_code": "677", "phone_number_lengths": [7], "validation_begin_with": ["7", "8"]}, | ||
{"alpha2": "SL", "alpha3": "SLE", "country_code": "232", "phone_number_lengths": [8], "validation_begin_with": ["21", "25", "30", "33", "34", "40", "44", "50", "55", "76", "77", "78", "79", "88"]}, | ||
{"alpha2": "SV", "alpha3": "SLV", "country_code": "503", "phone_number_lengths": [8], "validation_begin_with": ["7"]}, | ||
{"alpha2": "SM", "alpha3": "SMR", "country_code": "378", "phone_number_lengths": [10], "validation_begin_with": ["3", "6"]}, | ||
{"alpha2": "SO", "alpha3": "SOM", "country_code": "252", "phone_number_lengths": [8], "validation_begin_with": ["9"]}, | ||
{"alpha2": "PM", "alpha3": "SPM", "country_code": "508", "phone_number_lengths": [6], "validation_begin_with": ["55"]}, | ||
{"alpha2": "RS", "alpha3": "SRB", "country_code": "381", "phone_number_lengths": [8, 9], "validation_begin_with": ["6"]}, | ||
{"alpha2": "ST", "alpha3": "STP", "country_code": "239", "phone_number_lengths": [7], "validation_begin_with": ["98", "99"]}, | ||
{"alpha2": "SR", "alpha3": "SUR", "country_code": "597", "phone_number_lengths": [7], "validation_begin_with": ["6", "7", "8"]}, | ||
{"alpha2": "SK", "alpha3": "SVK", "country_code": "421", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "SI", "alpha3": "SVN", "country_code": "386", "phone_number_lengths": [8], "validation_begin_with": ["3", "4", "5", "6", "7"]}, | ||
{"alpha2": "SE", "alpha3": "SWE", "country_code": "46", "phone_number_lengths": [9], "validation_begin_with": ["7"]}, | ||
{"alpha2": "SZ", "alpha3": "SWZ", "country_code": "268", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "SC", "alpha3": "SYC", "country_code": "248", "phone_number_lengths": [7], "validation_begin_with": ["2"]}, | ||
{"alpha2": "SY", "alpha3": "SYR", "country_code": "963", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "TC", "alpha3": "TCA", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": ["2", "3", "4"]}, | ||
{"alpha2": "TD", "alpha3": "TCD", "country_code": "235", "phone_number_lengths": [8], "validation_begin_with": ["6", "7", "9"]}, | ||
{"alpha2": "TG", "alpha3": "TGO", "country_code": "228", "phone_number_lengths": [8], "validation_begin_with": ["9"]}, | ||
{"alpha2": "TH", "alpha3": "THA", "country_code": "66", "phone_number_lengths": [9], "validation_begin_with": ["8", "9"]}, | ||
{"alpha2": "TJ", "alpha3": "TJK", "country_code": "992", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "TK", "alpha3": "TKL", "country_code": "690", "phone_number_lengths": [4], "validation_begin_with": []}, | ||
{"alpha2": "TM", "alpha3": "TKM", "country_code": "993", "phone_number_lengths": [8], "validation_begin_with": []}, | ||
{"alpha2": "TL", "alpha3": "TLS", "country_code": "670", "phone_number_lengths": [8], "validation_begin_with": ["7"]}, | ||
{"alpha2": "TO", "alpha3": "TON", "country_code": "676", "phone_number_lengths": [5], "validation_begin_with": []}, | ||
{"alpha2": "TT", "alpha3": "TTO", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "TN", "alpha3": "TUN", "country_code": "216", "phone_number_lengths": [8], "validation_begin_with": ["2", "9"]}, | ||
{"alpha2": "TR", "alpha3": "TUR", "country_code": "90", "phone_number_lengths": [10], "validation_begin_with": ["5"]}, | ||
{"alpha2": "TV", "alpha3": "TUV", "country_code": "688", "phone_number_lengths": [5], "validation_begin_with": []}, | ||
{"alpha2": "TW", "alpha3": "TWN", "country_code": "886", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "TZ", "alpha3": "TZA", "country_code": "255", "phone_number_lengths": [9], "validation_begin_with": ["7"]}, | ||
{"alpha2": "UG", "alpha3": "UGA", "country_code": "256", "phone_number_lengths": [9], "validation_begin_with": ["7"]}, | ||
{"alpha2": "UA", "alpha3": "UKR", "country_code": "380", "phone_number_lengths": [9], "validation_begin_with": ["39", "50", "63", "66", "67", "68", "9"]}, | ||
{"alpha2": "UM", "alpha3": "UMI", "country_code": "", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "UY", "alpha3": "URY", "country_code": "598", "phone_number_lengths": [8], "validation_begin_with": ["9"]}, | ||
{"alpha2": "IS", "alpha3": "ISL", "country_code": "354", "phone_number_lengths": [7], "mobile_begin_with": ["6", "7", "8"]}, | ||
{"alpha2": "IL", "alpha3": "ISR", "country_code": "972", "phone_number_lengths": [9], "mobile_begin_with": ["5"]}, | ||
{"alpha2": "IT", "alpha3": "ITA", "country_code": "39", "phone_number_lengths": [10], "mobile_begin_with": ["3"]}, | ||
{"alpha2": "JM", "alpha3": "JAM", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "JE", "alpha3": "JEY", "country_code": "44", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "JO", "alpha3": "JOR", "country_code": "962", "phone_number_lengths": [9], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "JP", "alpha3": "JPN", "country_code": "81", "phone_number_lengths": [10], "mobile_begin_with": ["70", "80", "90"]}, | ||
{"alpha2": "KZ", "alpha3": "KAZ", "country_code": "7", "phone_number_lengths": [10], "mobile_begin_with": ["70", "77"]}, | ||
{"alpha2": "KE", "alpha3": "KEN", "country_code": "254", "phone_number_lengths": [9], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "KG", "alpha3": "KGZ", "country_code": "996", "phone_number_lengths": [9], "mobile_begin_with": ["5", "7"]}, | ||
{"alpha2": "KH", "alpha3": "KHM", "country_code": "855", "phone_number_lengths": [8, 9], "mobile_begin_with": ["1", "6", "7", "8", "9"]}, | ||
{"alpha2": "KI", "alpha3": "KIR", "country_code": "686", "phone_number_lengths": [5], "mobile_begin_with": ["9", "30"]}, | ||
{"alpha2": "KN", "alpha3": "KNA", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "KR", "alpha3": "KOR", "country_code": "82", "phone_number_lengths": [9, 10], "mobile_begin_with": ["1"]}, | ||
{"alpha2": "KW", "alpha3": "KWT", "country_code": "965", "phone_number_lengths": [8], "mobile_begin_with": ["5", "6", "9"]}, | ||
{"alpha2": "LA", "alpha3": "LAO", "country_code": "856", "phone_number_lengths": [10], "mobile_begin_with": ["20"]}, | ||
{"alpha2": "LB", "alpha3": "LBN", "country_code": "961", "phone_number_lengths": [7, 8], "mobile_begin_with": ["3", "7"]}, | ||
{"alpha2": "LR", "alpha3": "LBR", "country_code": "231", "phone_number_lengths": [7, 8], "mobile_begin_with": ["4", "5", "6", "7"]}, | ||
{"alpha2": "LY", "alpha3": "LBY", "country_code": "218", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "LC", "alpha3": "LCA", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "LI", "alpha3": "LIE", "country_code": "423", "phone_number_lengths": [7], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "LK", "alpha3": "LKA", "country_code": "94", "phone_number_lengths": [9], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "LS", "alpha3": "LSO", "country_code": "266", "phone_number_lengths": [8], "mobile_begin_with": ["5", "6"]}, | ||
{"alpha2": "LT", "alpha3": "LTU", "country_code": "370", "phone_number_lengths": [8], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "LU", "alpha3": "LUX", "country_code": "352", "phone_number_lengths": [9], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "LV", "alpha3": "LVA", "country_code": "371", "phone_number_lengths": [8], "mobile_begin_with": ["2"]}, | ||
{"alpha2": "MO", "alpha3": "MAC", "country_code": "853", "phone_number_lengths": [8], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "MF", "alpha3": "MAF", "country_code": "590", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "MA", "alpha3": "MAR", "country_code": "212", "phone_number_lengths": [9], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "MC", "alpha3": "MCO", "country_code": "377", "phone_number_lengths": [8, 9], "mobile_begin_with": ["4", "6"]}, | ||
{"alpha2": "MD", "alpha3": "MDA", "country_code": "373", "phone_number_lengths": [8], "mobile_begin_with": ["6", "7"]}, | ||
{"alpha2": "MG", "alpha3": "MDG", "country_code": "261", "phone_number_lengths": [9], "mobile_begin_with": ["3"]}, | ||
{"alpha2": "MV", "alpha3": "MDV", "country_code": "960", "phone_number_lengths": [7], "mobile_begin_with": ["7", "9"]}, | ||
{"alpha2": "MX", "alpha3": "MEX", "country_code": "52", "phone_number_lengths": [11], "mobile_begin_with": ["1"]}, | ||
{"alpha2": "MH", "alpha3": "MHL", "country_code": "692", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "MK", "alpha3": "MKD", "country_code": "389", "phone_number_lengths": [8], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "ML", "alpha3": "MLI", "country_code": "223", "phone_number_lengths": [8], "mobile_begin_with": ["6", "7"]}, | ||
{"alpha2": "MT", "alpha3": "MLT", "country_code": "356", "phone_number_lengths": [8], "mobile_begin_with": ["79", "99"]}, | ||
{"alpha2": "MM", "alpha3": "MMR", "country_code": "95", "phone_number_lengths": [8], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "ME", "alpha3": "MNE", "country_code": "382", "phone_number_lengths": [8], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "MN", "alpha3": "MNG", "country_code": "976", "phone_number_lengths": [8], "mobile_begin_with": ["5", "8", "9"]}, | ||
{"alpha2": "MP", "alpha3": "MNP", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "MZ", "alpha3": "MOZ", "country_code": "258", "phone_number_lengths": [9], "mobile_begin_with": ["8"]}, | ||
{"alpha2": "MR", "alpha3": "MRT", "country_code": "222", "phone_number_lengths": [8], "mobile_begin_with": []}, | ||
{"alpha2": "MS", "alpha3": "MSR", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "MQ", "alpha3": "MTQ", "country_code": "596", "phone_number_lengths": [9], "mobile_begin_with": ["696"]}, | ||
{"alpha2": "MU", "alpha3": "MUS", "country_code": "230", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "MW", "alpha3": "MWI", "country_code": "265", "phone_number_lengths": [9], "mobile_begin_with": ["77", "88", "99"]}, | ||
{"alpha2": "MY", "alpha3": "MYS", "country_code": "60", "phone_number_lengths": [9, 10], "mobile_begin_with": ["1"]}, | ||
{"alpha2": "YT", "alpha3": "MYT", "country_code": "269", "phone_number_lengths": [9], "mobile_begin_with": ["639"]}, | ||
{"alpha2": "NA", "alpha3": "NAM", "country_code": "264", "phone_number_lengths": [9], "mobile_begin_with": ["60", "81", "82", "85"]}, | ||
{"alpha2": "NC", "alpha3": "NCL", "country_code": "687", "phone_number_lengths": [6], "mobile_begin_with": []}, | ||
{"alpha2": "NE", "alpha3": "NER", "country_code": "227", "phone_number_lengths": [8], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "NF", "alpha3": "NFK", "country_code": "672", "phone_number_lengths": [5], "mobile_begin_with": ["5", "8"]}, | ||
{"alpha2": "NG", "alpha3": "NGA", "country_code": "234", "phone_number_lengths": [10], "mobile_begin_with": ["70", "80", "81"]}, | ||
{"alpha2": "NI", "alpha3": "NIC", "country_code": "505", "phone_number_lengths": [8], "mobile_begin_with": ["8"]}, | ||
{"alpha2": "NU", "alpha3": "NIU", "country_code": "683", "phone_number_lengths": [4], "mobile_begin_with": []}, | ||
{"alpha2": "NL", "alpha3": "NLD", "country_code": "31", "phone_number_lengths": [9], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "NO", "alpha3": "NOR", "country_code": "47", "phone_number_lengths": [8], "mobile_begin_with": ["4", "9"]}, | ||
{"alpha2": "NP", "alpha3": "NPL", "country_code": "977", "phone_number_lengths": [10], "mobile_begin_with": ["97", "98"]}, | ||
{"alpha2": "NR", "alpha3": "NRU", "country_code": "674", "phone_number_lengths": [7], "mobile_begin_with": ["555"]}, | ||
{"alpha2": "NZ", "alpha3": "NZL", "country_code": "64", "phone_number_lengths": [8, 9, 10], "mobile_begin_with": ["2"]}, | ||
{"alpha2": "OM", "alpha3": "OMN", "country_code": "968", "phone_number_lengths": [8], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "PK", "alpha3": "PAK", "country_code": "92", "phone_number_lengths": [10], "mobile_begin_with": ["3"]}, | ||
{"alpha2": "PA", "alpha3": "PAN", "country_code": "507", "phone_number_lengths": [8], "mobile_begin_with": ["5", "6"]}, | ||
{"alpha2": "PN", "alpha3": "PCN", "country_code": "", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "PE", "alpha3": "PER", "country_code": "51", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "PH", "alpha3": "PHL", "country_code": "63", "phone_number_lengths": [10], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "PW", "alpha3": "PLW", "country_code": "680", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "PG", "alpha3": "PNG", "country_code": "675", "phone_number_lengths": [8], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "PL", "alpha3": "POL", "country_code": "48", "phone_number_lengths": [9], "mobile_begin_with": ["5", "6", "7", "8"]}, | ||
{"alpha2": "PR", "alpha3": "PRI", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "KP", "alpha3": "PRK", "country_code": "850", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "PT", "alpha3": "PRT", "country_code": "351", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "PY", "alpha3": "PRY", "country_code": "595", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "PS", "alpha3": "PSE", "country_code": "970", "phone_number_lengths": [9], "mobile_begin_with": ["5"]}, | ||
{"alpha2": "PF", "alpha3": "PYF", "country_code": "689", "phone_number_lengths": [6], "mobile_begin_with": []}, | ||
{"alpha2": "QA", "alpha3": "QAT", "country_code": "974", "phone_number_lengths": [8], "mobile_begin_with": ["33", "55", "66", "77"]}, | ||
{"alpha2": "RE", "alpha3": "REU", "country_code": "262", "phone_number_lengths": [9], "mobile_begin_with": ["692", "693"]}, | ||
{"alpha2": "RO", "alpha3": "ROU", "country_code": "40", "phone_number_lengths": [9], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "RU", "alpha3": "RUS", "country_code": "7", "phone_number_lengths": [10], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "RW", "alpha3": "RWA", "country_code": "250", "phone_number_lengths": [9], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "SA", "alpha3": "SAU", "country_code": "966", "phone_number_lengths": [9], "mobile_begin_with": ["5"]}, | ||
{"alpha2": "SD", "alpha3": "SDN", "country_code": "249", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "SN", "alpha3": "SEN", "country_code": "221", "phone_number_lengths": [9], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "SG", "alpha3": "SGP", "country_code": "65", "phone_number_lengths": [8], "mobile_begin_with": ["8", "9"]}, | ||
{"alpha2": "GS", "alpha3": "SGS", "country_code": "500", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "SH", "alpha3": "SHN", "country_code": "290", "phone_number_lengths": [4], "mobile_begin_with": []}, | ||
{"alpha2": "SJ", "alpha3": "SJM", "country_code": "47", "phone_number_lengths": [8], "mobile_begin_with": []}, | ||
{"alpha2": "SB", "alpha3": "SLB", "country_code": "677", "phone_number_lengths": [7], "mobile_begin_with": ["7", "8"]}, | ||
{"alpha2": "SL", "alpha3": "SLE", "country_code": "232", "phone_number_lengths": [8], "mobile_begin_with": ["21", "25", "30", "33", "34", "40", "44", "50", "55", "76", "77", "78", "79", "88"]}, | ||
{"alpha2": "SV", "alpha3": "SLV", "country_code": "503", "phone_number_lengths": [8], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "SM", "alpha3": "SMR", "country_code": "378", "phone_number_lengths": [10], "mobile_begin_with": ["3", "6"]}, | ||
{"alpha2": "SO", "alpha3": "SOM", "country_code": "252", "phone_number_lengths": [8], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "PM", "alpha3": "SPM", "country_code": "508", "phone_number_lengths": [6], "mobile_begin_with": ["55"]}, | ||
{"alpha2": "RS", "alpha3": "SRB", "country_code": "381", "phone_number_lengths": [8, 9], "mobile_begin_with": ["6"]}, | ||
{"alpha2": "ST", "alpha3": "STP", "country_code": "239", "phone_number_lengths": [7], "mobile_begin_with": ["98", "99"]}, | ||
{"alpha2": "SR", "alpha3": "SUR", "country_code": "597", "phone_number_lengths": [7], "mobile_begin_with": ["6", "7", "8"]}, | ||
{"alpha2": "SK", "alpha3": "SVK", "country_code": "421", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "SI", "alpha3": "SVN", "country_code": "386", "phone_number_lengths": [8], "mobile_begin_with": ["3", "4", "5", "6", "7"]}, | ||
{"alpha2": "SE", "alpha3": "SWE", "country_code": "46", "phone_number_lengths": [9], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "SZ", "alpha3": "SWZ", "country_code": "268", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "SC", "alpha3": "SYC", "country_code": "248", "phone_number_lengths": [7], "mobile_begin_with": ["2"]}, | ||
{"alpha2": "SY", "alpha3": "SYR", "country_code": "963", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "TC", "alpha3": "TCA", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": ["2", "3", "4"]}, | ||
{"alpha2": "TD", "alpha3": "TCD", "country_code": "235", "phone_number_lengths": [8], "mobile_begin_with": ["6", "7", "9"]}, | ||
{"alpha2": "TG", "alpha3": "TGO", "country_code": "228", "phone_number_lengths": [8], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "TH", "alpha3": "THA", "country_code": "66", "phone_number_lengths": [9], "mobile_begin_with": ["8", "9"]}, | ||
{"alpha2": "TJ", "alpha3": "TJK", "country_code": "992", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "TK", "alpha3": "TKL", "country_code": "690", "phone_number_lengths": [4], "mobile_begin_with": []}, | ||
{"alpha2": "TM", "alpha3": "TKM", "country_code": "993", "phone_number_lengths": [8], "mobile_begin_with": []}, | ||
{"alpha2": "TL", "alpha3": "TLS", "country_code": "670", "phone_number_lengths": [8], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "TO", "alpha3": "TON", "country_code": "676", "phone_number_lengths": [5], "mobile_begin_with": []}, | ||
{"alpha2": "TT", "alpha3": "TTO", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "TN", "alpha3": "TUN", "country_code": "216", "phone_number_lengths": [8], "mobile_begin_with": ["2", "9"]}, | ||
{"alpha2": "TR", "alpha3": "TUR", "country_code": "90", "phone_number_lengths": [10], "mobile_begin_with": ["5"]}, | ||
{"alpha2": "TV", "alpha3": "TUV", "country_code": "688", "phone_number_lengths": [5], "mobile_begin_with": []}, | ||
{"alpha2": "TW", "alpha3": "TWN", "country_code": "886", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "TZ", "alpha3": "TZA", "country_code": "255", "phone_number_lengths": [9], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "UG", "alpha3": "UGA", "country_code": "256", "phone_number_lengths": [9], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "UA", "alpha3": "UKR", "country_code": "380", "phone_number_lengths": [9], "mobile_begin_with": ["39", "50", "63", "66", "67", "68", "9"]}, | ||
{"alpha2": "UM", "alpha3": "UMI", "country_code": "", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "UY", "alpha3": "URY", "country_code": "598", "phone_number_lengths": [8], "mobile_begin_with": ["9"]}, | ||
// http://en.wikipedia.org/wiki/List_of_North_American_Numbering_Plan_area_codes#900.E2.80.93999 | ||
// http://www.howtocallabroad.com/usa/ | ||
// http://areacode.org/ | ||
// http://countrycode.org/usa | ||
{"alpha2": "US", "alpha3": "USA", "country_code": "1", "phone_number_lengths": [10], | ||
"validation_begin_with": ["201", "202", "203", "205", "206", "207", "208", "209", "210", "212", "213", "214", | ||
"215", "216", "217", "218", "219", "224", "225", "227", "228", "229", "231", "234", "239", "240", "248", | ||
"251", "252", "253", "254", "256", "260", "262", "267", "269", "270", "272", "274", "276", "281", "283", | ||
"301", "302", "303", "304", "305", "307", "308", "309", "310", "312", "313", "314", "315", "316", "317", | ||
"318", "319", "320", "321", "323", "325", "327", "330", "331", "334", "336", "337", "339", "341", "346", | ||
"347", "351", "352", "360", "361", "364", "369", "380", "385", "386", "401", "402", "404", "405", "406", | ||
"407", "408", "409", "410", "412", "413", "414", "415", "417", "419", "423", "424", "425", "430", "432", | ||
"434", "435", "440", "442", "443", "445", "447", "458", "464", "469", "470", "475", "478", "479", "480", | ||
"484", "501", "502", "503", "504", "505", "507", "508", "509", "510", "512", "513", "515", "516", "517", | ||
"518", "520", "530", "531", "534", "539", "540", "541", "551", "557", "559", "561", "562", "563", "564", | ||
"567", "570", "571", "573", "574", "575", "580", "582", "585", "586", "601", "602", "603", "605", "606", | ||
"607", "608", "609", "610", "612", "614", "615", "616", "617", "618", "619", "620", "623", "626", "627", | ||
"628", "630", "631", "636", "641", "646", "650", "651", "657", "659", "660", "661", "662", "667", "669", | ||
"678", "679", "681", "682", "689", "701", "702", "703", "704", "706", "707", "708", "712", "713", "714", | ||
"715", "716", "717", "718", "719", "720", "724", "725", "727", "730", "731", "732", "734", "737", "740", | ||
"747", "754", "757", "760", "762", "763", "764", "765", "769", "770", "772", "773", "774", "775", "779", | ||
"781", "785", "786", "801", "802", "803", "804", "805", "806", "808", "810", "812", "813", "814", "815", | ||
"816", "817", "818", "828", "830", "831", "832", "835", "843", "845", "847", "848", "850", "856", "857", | ||
"858", "859", "860", "862", "863", "864", "865", "870", "872", "878", "901", "903", "904", "906", "907", | ||
"908", "909", "910", "912", "913", "914", "915", "916", "917", "918", "919", "920", "925", "928", "929", | ||
"931", "935", "936", "937", "938", "940", "941", "947", "949", "951", "952", "954", "956", "959", "970", | ||
"971", "972", "973", "975", "978", "979", "980", "984", "985", "989"]}, | ||
{"alpha2": "UZ", "alpha3": "UZB", "country_code": "998", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "VA", "alpha3": "VAT", "country_code": "39", "phone_number_lengths": [], "validation_begin_with": []}, | ||
{"alpha2": "VC", "alpha3": "VCT", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "VE", "alpha3": "VEN", "country_code": "58", "phone_number_lengths": [10], "validation_begin_with": ["4"]}, | ||
{"alpha2": "VG", "alpha3": "VGB", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "VI", "alpha3": "VIR", "country_code": "1", "phone_number_lengths": [7], "validation_begin_with": []}, | ||
{"alpha2": "VN", "alpha3": "VNM", "country_code": "84", "phone_number_lengths": [9, 10], "validation_begin_with": ["9", "1"]}, | ||
{"alpha2": "VU", "alpha3": "VUT", "country_code": "678", "phone_number_lengths": [7], "validation_begin_with": ["5", "7"]}, | ||
{"alpha2": "WF", "alpha3": "WLF", "country_code": "681", "phone_number_lengths": [6], "validation_begin_with": []}, | ||
{"alpha2": "WS", "alpha3": "WSM", "country_code": "685", "phone_number_lengths": [7], "validation_begin_with": ["7"]}, | ||
{"alpha2": "YE", "alpha3": "YEM", "country_code": "967", "phone_number_lengths": [9], "validation_begin_with": ["7"]}, | ||
{"alpha2": "ZA", "alpha3": "ZAF", "country_code": "27", "phone_number_lengths": [9], "validation_begin_with": ["6", "7", "8"]}, | ||
{"alpha2": "ZM", "alpha3": "ZMB", "country_code": "260", "phone_number_lengths": [9], "validation_begin_with": ["9"]}, | ||
{"alpha2": "ZW", "alpha3": "ZWE", "country_code": "263", "phone_number_lengths": [9], "validation_begin_with": ["71", "73", "77"]} | ||
"mobile_begin_with": ["201", "202", "203", "205", "206", "207", "208", "209", "210", "212", "213", "214", | ||
"215", "216", "217", "218", "219", "224", "225", "227", "228", "229", "231", "234","239", "240", "248", | ||
"251", "252", "253", "254", "256", "260", "262", "267", "269", "270", "272", "274", "276", "278", "281", | ||
"283", "301", "302", "303", "304", "305", "307", "308", "309", "310", "312", "313", "314", "315", "316", | ||
"317", "318", "319", "320", "321", "323", "325", "327", "330", "331", "334", "336", "337", "339", "341", | ||
"346", "347", "351", "352", "360", "361", "364", "369", "380", "385", "386", "401", "402", "404", "405", | ||
"406", "407", "408", "409", "410", "412", "413", "414", "415", "417", "419", "423", "424", "425", "430", | ||
"432", "434", "435", "440", "442", "443", "445", "447", "458", "464", "469", "470", "475", "478", "479", | ||
"480", "484", "501", "502", "503", "504", "505", "507", "508", "509", "510", "512", "513", "515", "516", | ||
"517", "518", "520", "530", "531", "534", "539", "540", "541", "551", "557", "559", "561", "562", "563", | ||
"564", "567", "570", "571", "573", "574", "575", "580", "582", "585", "586", "601", "602", "603", "605", | ||
"606", "607", "608", "609", "610", "612", "614", "615", "616", "617", "618", "619", "620", "623", "626", | ||
"627", "628", "630", "631", "636", "641", "646", "650", "651", "657", "659", "660", "661", "662", "667", | ||
"669", "678", "679", "681", "682", "689", "701", "702", "703", "704", "706", "707", "708", "712", "713", | ||
"714", "715", "716", "717", "718", "719", "720", "724", "725", "727", "730", "731", "732", "734", "737", | ||
"740", "747", "752", "754", "757", "760", "762", "763", "764", "765", "769", "770", "772", "773", "774", | ||
"775", "779", "781", "785", "786", "801", "802", "803", "804", "805", "806", "808", "810", "812", "813", | ||
"814", "815", "816", "817", "818", "828", "830", "831", "832", "835", "843", "845", "847", "848", "850", | ||
"856", "857", "858", "859", "860", "862", "863", "864", "865", "870", "872", "878", "901", "903", "904", | ||
"906", "907", "908", "909", "910", "912", "913", "914", "915", "916", "917", "918", "919", "920", "925", | ||
"927", "928", "929", "931", "935", "936", "937", "938", "940", "941", "947", "949", "951", "952", "954", | ||
"956", "957", "959", "970", "971", "972", "973", "975", "978", "979", "980", "984", "985", "989"]}, | ||
{"alpha2": "UZ", "alpha3": "UZB", "country_code": "998", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "VA", "alpha3": "VAT", "country_code": "39", "phone_number_lengths": [], "mobile_begin_with": []}, | ||
{"alpha2": "VC", "alpha3": "VCT", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "VE", "alpha3": "VEN", "country_code": "58", "phone_number_lengths": [10], "mobile_begin_with": ["4"]}, | ||
{"alpha2": "VG", "alpha3": "VGB", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "VI", "alpha3": "VIR", "country_code": "1", "phone_number_lengths": [7], "mobile_begin_with": []}, | ||
{"alpha2": "VN", "alpha3": "VNM", "country_code": "84", "phone_number_lengths": [9, 10], "mobile_begin_with": ["9", "1"]}, | ||
{"alpha2": "VU", "alpha3": "VUT", "country_code": "678", "phone_number_lengths": [7], "mobile_begin_with": ["5", "7"]}, | ||
{"alpha2": "WF", "alpha3": "WLF", "country_code": "681", "phone_number_lengths": [6], "mobile_begin_with": []}, | ||
{"alpha2": "WS", "alpha3": "WSM", "country_code": "685", "phone_number_lengths": [7], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "YE", "alpha3": "YEM", "country_code": "967", "phone_number_lengths": [9], "mobile_begin_with": ["7"]}, | ||
{"alpha2": "ZA", "alpha3": "ZAF", "country_code": "27", "phone_number_lengths": [9], "mobile_begin_with": ["6", "7", "8"]}, | ||
{"alpha2": "ZM", "alpha3": "ZMB", "country_code": "260", "phone_number_lengths": [9], "mobile_begin_with": ["9"]}, | ||
{"alpha2": "ZW", "alpha3": "ZWE", "country_code": "263", "phone_number_lengths": [9], "mobile_begin_with": ["71", "73", "77"]} | ||
]; | ||
@@ -632,2 +638,3 @@ var iso2_map = Object.freeze({ | ||
* | ||
* 1. If no "+" sign, must treat as USA phone | ||
* @param phone | ||
@@ -656,11 +663,12 @@ * @param country | ||
var output_set = []; | ||
var validated_by_begin_with = function(phone, iso3166) { | ||
if (!iso3166.validation_begin_with.length && output_set.indexOf(phone) === -1) { | ||
if (!iso3166.mobile_begin_with.length && output_set.indexOf(phone) === -1) { | ||
output_set.push(phone); | ||
} | ||
for (var i in iso3166.validation_begin_with) { | ||
var regex = new RegExp('^' + iso3166.validation_begin_with[i]); | ||
for (var i in iso3166.mobile_begin_with) { | ||
var regex = new RegExp('^' + iso3166.mobile_begin_with[i]); | ||
if (phone.match(regex) && output_set.indexOf(phone) === -1) { | ||
@@ -673,3 +681,3 @@ output_set.push(phone); | ||
//if no length validation | ||
if (!iso3166.phone_number_lengths.length) { | ||
if (iso3166.phone_number_lengths.length === 0) { | ||
//remove leading country code | ||
@@ -676,0 +684,0 @@ phone = phone.replace(new RegExp('^' + iso3166.country_code), ''); |
{ | ||
"name": "phone", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "With a given country and phone number, validate and format the phone number to E.164 standard", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index", |
@@ -79,2 +79,3 @@ ## What is node-phone? | ||
## Change Log | ||
* 0.0.6 Added France mobile prefix `7`, updated USA, Canada area code. | ||
* 0.0.5 Performance tuning, updated Iceland mobile format to 7 digits only. | ||
@@ -81,0 +82,0 @@ * 0.0.4 Added US, CA area code to make it more accurate. |
@@ -6,2 +6,18 @@ var should = require('should'), | ||
describe("phone('(817) 569-8900', '')", function() { | ||
it('returns +18175698900, as no country code given, will treat it as USA', function() { | ||
var result = phone('(817) 569-8900', ''); | ||
result.should.eql('+18175698900'); | ||
}); | ||
}); | ||
describe("phone('(852) 569-8900', '')", function() { | ||
it('returns null, will treat it as USA, but 852 is NOT a valid USA mobile_begin_with', function() { | ||
var result = (phone('(852) 569-8900', '') === null); | ||
result.should.eql(true); | ||
}); | ||
}); | ||
describe("phone('+1 (817) 569-8900', '')", function() { | ||
@@ -30,4 +46,3 @@ it('returns +18175698900', function() { | ||
describe("phone('22-6569-8900', '')", function() { | ||
// as 226 is NOT a valid USA code | ||
it('returns null', function() { | ||
it('returns null, as 226 is NOT a valid USA code', function() { | ||
var result = (phone('22-6569-8900', '') == null); | ||
@@ -45,5 +60,5 @@ result.should.eql(true); | ||
describe("phone('+1 (817) 569-8900', 'uniTed States')", function() { | ||
describe("phone('+1 (817) 569-8900', 'United States')", function() { | ||
it('returns +18175698900', function() { | ||
var result = phone('+1 (817) 569-8900', 'uniTed States'); | ||
var result = phone('+1 (817) 569-8900', 'United States'); | ||
result.should.eql('+18175698900'); | ||
@@ -53,5 +68,5 @@ }); | ||
describe("phone('+1 (817) 569-8900', ' uniTed States ')", function() { | ||
describe("phone('+1 (817) 569-8900', ' United States ')", function() { | ||
it('returns +18175698900', function() { | ||
var result = phone('+1 (817) 569-8900', ' uniTed States '); | ||
var result = phone('+1 (817) 569-8900', ' United States '); | ||
result.should.eql('+18175698900'); | ||
@@ -78,2 +93,45 @@ }); | ||
describe('Testing CAN Phone', function() { | ||
describe("phone('+1 (403) 569-8900', '')", function() { | ||
it('returns +14035698900', function() { | ||
var result = phone('+1 (403) 569-8900', ''); | ||
result.should.eql('+14035698900'); | ||
}); | ||
}); | ||
describe("phone('+1 (403) 569-8900', null)", function() { | ||
it('returns +14035698900', function() { | ||
var result = phone('+1 (403) 569-8900', null); | ||
result.should.eql('+14035698900'); | ||
}); | ||
}); | ||
describe("phone('212345678', '')", function() { | ||
it('returns null', function() { | ||
var result = (phone('212345678', '') === null); | ||
result.should.eql(true); | ||
}); | ||
}); | ||
describe("phone('40-3569-8900', '')", function() { | ||
// as 403 is NOT a valid USA code | ||
it('returns null', function() { | ||
var result = (phone('40-3569-8900', '') == null); | ||
result.should.eql(true); | ||
}); | ||
}); | ||
describe("phone('40-3569-8900', 'CAN')", function() { | ||
// should return +14035698900, as it is a valid CAN phone | ||
it('returns +14035698900', function() { | ||
var result = phone('40-3569-8900', 'CAN'); | ||
result.should.eql('+14035698900'); | ||
}); | ||
}); | ||
}); | ||
describe('Testing HK Phone', function() { | ||
@@ -80,0 +138,0 @@ |
57551
857
87
2