@@ -162,6 +162,36 @@ const phones = {
162162 'ar-EH' : / ^ ( \+ ? 2 1 2 | 0 ) [ \s \- ] ? ( 5 2 8 8 | 5 2 8 9 ) [ \s \- ] ? \d { 5 } $ / ,
163163 'fa-AF' : / ^ ( \+ 9 3 | 0 ) ? ( 2 { 1 } [ 0 - 8 ] { 1 } | [ 3 - 5 ] { 1 } [ 0 - 4 ] { 1 } ) ( \d { 7 } ) $ / ,
164164 'mk-MK' : / ^ ( \+ ? 3 8 9 | 0 ) ? ( (?: 2 [ 2 - 9 ] \d { 6 } | (?: 3 [ 1 - 4 ] | 4 [ 2 - 8 ] ) \d { 6 } | 5 0 0 \d { 5 } | 5 [ 2 - 9 ] \d { 6 } | 7 [ 0 - 9 ] [ 2 - 9 ] \d { 5 } | 8 [ 1 - 9 ] \d { 6 } | 8 0 0 \d { 5 } | 8 0 0 9 \d { 4 } ) ) $ / ,
165+ 'en-AS' : / ^ ( \+ ? 1 | 0 ) 6 8 4 \d { 7 } $ / , // American Samoa
166+ 'aq-AQ' : / ^ ( \+ ? 6 7 2 | 0 ) ? \d { 8 } $ / , // Antarctica (limited coverage)
167+ 'en-BB' : / ^ ( \+ ? 1 | 0 ) 2 4 6 \d { 7 } $ / , // Barbados
168+ 'en-BZ' : / ^ ( \+ ? 5 0 1 | 0 ) ? [ 6 7 ] \d { 6 } $ / , // Belize
169+ 'nl-BQ' : / ^ ( \+ ? 5 9 9 | 0 ) ? [ 7 9 ] \d { 6 } $ / , // Bonaire, Sint Eustatius and Saba
170+ 'no-BV' : / ^ ( \+ ? 4 7 | 0 ) ? \d { 8 } $ / , // Bouvet Island (uses Norway's system)
171+ 'en-IO' : / ^ ( \+ ? 2 4 6 | 0 ) ? \d { 7 } $ / , // British Indian Ocean Territory
172+ 'ms-BN' : / ^ ( \+ ? 6 7 3 | 0 ) ? [ 1 - 9 ] \d { 6 } $ / , // Brunei Darussalam
173+ 'rn-BI' : / ^ ( \+ ? 2 5 7 | 0 ) ? [ 6 7 ] \d { 7 } $ / , // Burundi
174+ 'pt-CV' : / ^ ( \+ ? 2 3 8 | 0 ) ? [ 5 9 ] \d { 6 } $ / , // Cabo Verde
175+ 'km-KH' : / ^ ( \+ ? 8 5 5 | 0 ) ? [ 1 - 9 ] \d { 7 } $ / , // Cambodia
176+ 'en-KY' : / ^ ( \+ ? 1 | 0 ) 3 4 5 \d { 7 } $ / , // Cayman Islands
177+ 'ar-TD' : / ^ ( \+ ? 2 3 5 | 0 ) ? [ 1 - 9 ] \d { 7 } $ / , // Chad
178+ 'en-CX' : / ^ ( \+ ? 6 1 | 0 ) ? 4 \d { 8 } $ / , // Christmas Island (uses Australia's system)
179+ 'en-CC' : / ^ ( \+ ? 6 1 | 0 ) ? 4 \d { 8 } $ / , // Cocos (Keeling) Islands (uses Australia's system)
180+ 'ar-KM' : / ^ ( \+ ? 2 6 9 | 0 ) ? [ 3 - 7 ] \d { 6 } $ / , // Comoros
181+ 'fr-CG' : / ^ ( \+ ? 2 4 2 | 0 ) ? [ 1 - 9 ] \d { 8 } $ / , // Congo
182+ 'en-CK' : / ^ ( \+ ? 6 8 2 | 0 ) ? [ 2 - 9 ] \d { 4 } $ / , // Cook Islands
183+ 'hr-HR' : / ^ ( \+ ? 3 8 5 | 0 ) ? [ 1 - 9 ] \d { 8 } $ / , // Croatia
184+ 'nl-CW' : / ^ ( \+ ? 5 9 9 | 0 ) ? [ 6 9 ] \d { 6 } $ / , // Curaçao
185+ 'fr-CI' : / ^ ( \+ ? 2 2 5 | 0 ) ? [ 0 - 9 ] \d { 9 } $ / , // Côte d'Ivoire
186+ 'ar-DJ' : / ^ ( \+ ? 2 5 3 | 0 ) ? [ 1 - 9 ] \d { 7 } $ / , // Djibouti
187+ 'en-DM' : / ^ ( \+ ? 1 | 0 ) 7 6 7 \d { 7 } $ / , // Dominica
188+ 'es-GQ' : / ^ ( \+ ? 2 4 0 | 0 ) ? [ 1 - 9 ] \d { 8 } $ / , // Equatorial Guinea
189+ 'ti-ER' : / ^ ( \+ ? 2 9 1 | 0 ) ? [ 1 - 9 ] \d { 6 } $ / , // Eritrea
190+ 'en-SZ' : / ^ ( \+ ? 2 6 8 | 0 ) ? [ 1 - 9 ] \d { 7 } $ / , // Eswatini
191+ 'am-ET' : / ^ ( \+ ? 2 5 1 | 0 ) ? [ 1 - 9 ] \d { 8 } $ / , // Ethiopia
192+ 'en-FK' : / ^ ( \+ ? 5 0 0 | 0 ) ? [ 1 - 9 ] \d { 4 } $ / , // Falkland Islands (Malvinas)
193+ 'fr-TF' : / ^ ( \+ ? 2 6 2 | 0 ) ? [ 1 - 9 ] \d { 8 } $ / , // French Southern Territories
194+ 'fr-GA' : / ^ ( \+ ? 2 4 1 | 0 ) ? [ 1 - 9 ] \d { 7 } $ / , // Gabon
165195} ;
166196/* eslint-enable max-len */
167197
@@ -175,6 +205,21 @@ phones['ga-IE'] = phones['en-IE'];
175205phones [ 'fr-CH' ] = phones [ 'de-CH' ] ;
176206phones [ 'it-CH' ] = phones [ 'fr-CH' ] ;
177207
208+ // Additional aliases for new countries
209+ phones [ 'en-CI' ] = phones [ 'fr-CI' ] ; // Côte d'Ivoire (alternative code)
210+ phones [ 'en-CV' ] = phones [ 'pt-CV' ] ; // Cabo Verde (alternative code)
211+ phones [ 'en-KH' ] = phones [ 'km-KH' ] ; // Cambodia (alternative code)
212+ phones [ 'en-TD' ] = phones [ 'ar-TD' ] ; // Chad (alternative code)
213+ phones [ 'en-KM' ] = phones [ 'ar-KM' ] ; // Comoros (alternative code)
214+ phones [ 'en-CG' ] = phones [ 'fr-CG' ] ; // Congo (alternative code)
215+ phones [ 'en-DJ' ] = phones [ 'ar-DJ' ] ; // Djibouti (alternative code)
216+ phones [ 'en-GQ' ] = phones [ 'es-GQ' ] ; // Equatorial Guinea (alternative code)
217+ phones [ 'en-ER' ] = phones [ 'ti-ER' ] ; // Eritrea (alternative code)
218+ phones [ 'en-ET' ] = phones [ 'am-ET' ] ; // Ethiopia (alternative code)
219+ phones [ 'en-GA' ] = phones [ 'fr-GA' ] ; // Gabon (alternative code)
220+ phones [ 'en-BI' ] = phones [ 'rn-BI' ] ; // Burundi (alternative code)
221+ phones [ 'en-BN' ] = phones [ 'ms-BN' ] ; // Brunei Darussalam (alternative code)
222+
178223export default function isMobilePhone ( str , locale , options ) {
179224 assertString ( str ) ;
180225 if ( options && options . strictMode && ! str . startsWith ( '+' ) ) {
0 commit comments