Phone

May 27, 2025 ยท View on GitHub

The phone number, in its canonical international E.164 numbering plan format.

Structure

Phone

Fields

NameTypeTagsDescriptionGetterSetter
CountryCodeStringRequiredThe country calling code (CC), in its canonical international E.164 numbering plan format. The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).

Constraints: Minimum Length: 1, Maximum Length: 3, Pattern: ^[0-9]{1,3}?$
String getCountryCode()setCountryCode(String countryCode)
NationalNumberStringRequiredThe national number, in its canonical international E.164 numbering plan format. The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).

Constraints: Minimum Length: 1, Maximum Length: 14, Pattern: ^[0-9]{1,14}?$
String getNationalNumber()setNationalNumber(String nationalNumber)
ExtensionNumberStringOptionalThe extension number.

Constraints: Minimum Length: 1, Maximum Length: 15, Pattern: ^[0-9]{1,15}?$
String getExtensionNumber()setExtensionNumber(String extensionNumber)

Example (as JSON)

{
  "country_code": "country_code8",
  "national_number": "national_number2",
  "extension_number": "extension_number2"
}