Yext uses libphonenumber, a Google library, to parse and validate phone number data in Yext Content. If libphonenumber determines that a phone number is invalid, it will prevent that phone number from being saved to an entity in Content. This article provides steps to troubleshoot and validate a phone number that is blocked from being added to Yext Content.
Note: The Phone field type is a standard field type in Yext, used for built-in fields such as Main Phone, Alternate Phone, and Mobile Phone. It is not available for use in custom fields at this time.
Phone Number Validation
If you are blocked from adding a phone number to an entity in Content, and you believe that the phone number is valid, here is how you can troubleshoot:
- Test the phone number in the libphonenumber demo.
- In Step 1, enter a single phone number in the “Specify a Phone Number” field, or upload a CSV file of multiple phone numbers.
- You can enter the phone number with or without formatting and the numeric country code — for example, to test the Yext company phone number, you could enter “(212) 994-3900”, “+1 (212) 994-3900”, or “2129943900”. Any of these options will work.
- Note: If you upload a file of multiple phone numbers, they must all correspond to the same country code.
- You can enter the phone number with or without formatting and the numeric country code — for example, to test the Yext company phone number, you could enter “(212) 994-3900”, “+1 (212) 994-3900”, or “2129943900”. Any of these options will work.
- In Step 2, enter the two-letter country code for the phone number.
- This is the ISO 3166 alpha-2 code (e.g., “us” for the United States). A full list of these country codes can be found here.
- (Optional) In Step 3, you can enter a locale for phone number geocoding, which specifies the language of the country where the phone number is registered. This step is not necessary, and will default to English if not entered.
- In the first box, enter a valid ISO language code (full list here).
- In the second box, you have the option to further specify a region, if the language you entered is spoken in multiple countries (e.g., American English vs. British English). Specify a region using the same ISO country code used in Step 2. (For example, to specify American English, the language code would be “en” and the country code would be “us”). You can also leave this box blank.
- In Step 1, enter a single phone number in the “Specify a Phone Number” field, or upload a CSV file of multiple phone numbers.
- The demo will return information about the phone number you entered. See the Validation Results table:
-
-
-
Result from isPossibleNumber(): If this phone number is possible to have in the country specified, this will be true.
- For example, all US phone numbers have 11 digits, including the “+1” country code. If a 12-digit phone number is entered with the country code “us,” this is not a phone number that could exist in the US, so this field would be marked false.
- Result from isValidNumber(): If this is a valid registered phone number in the country specified, this will be true.
- Result from isValidNumberForRegion(): If the phone number contains all the appropriate information for the country specified, this will be true.
- For example, if the country code is “us”, but the phone number does not contain an area code matching a US state or territory, this means it is not a valid phone number for the region, and this field would be marked false.
-
Result from isPossibleNumber(): If this phone number is possible to have in the country specified, this will be true.
-
-
- If any of the Validation Results fields are false:
- Libphonenumber is telling us the phone number is invalid, so Yext Content is not accepting the phone number.
- If you believe the phone number is valid and the libphonenumber test is incorrect, submit a ticket with libphonenumber here.
- Make sure to include relevant information from the demo test showing that the phone number was invalid, as well as any information demonstrating why the phone number should be valid.
- When libphonenumber resolves the issue, please let us know by contacting Yext Support or your Client Success Manager. We will need to update our library to pick up any changes that libphonenumber may have made.
- If all of the Validation Results fields are true:
- Libphonenumber is telling us the phone number is valid, but Yext Content is still not accepting the phone number. This may be an issue with the Yext Content.
- Contact Yext Support to resolve the issue.
Comments
0 comments
Article is closed for comments.