/

Phone PHONE

Description and examples API
-
Name and descriptionType Value
[metadata]
List of phone number parsing and formatting rules for all countries.

The complete list of those rules is huge, so libphonenumber-js provides a way to optimize bundle size by choosing between max , min , mobile metadata.

MetadataJson
'min'
[countryIsoCode]
Country ISO-code
string
'RU'
[strict]
If true, it allows to enter only phone number of selected country (see countryIsoCode property). If false, all country phone number is allowed.

Default:true

boolean
[separator]
Separator between groups of numbers in a phone number (excluding country code and area code).

Default:-

string
'-'
[format]
Phone number format. 'INTERNATIONAL' includes the country code prefix (e.g., +1 212 343-3355 ). 'NATIONAL' uses country-specific formatting without the country code (e.g., (212) 343-3355 for US).

Note:'NATIONAL' format only works with strict: true mode.

Default:'INTERNATIONAL'

'INTERNATIONAL'  |  'NATIONAL'
'INTERNATIONAL'