invalid_country_code
The calling code after the + is not assigned to any country
The number starts with a calling code the international numbering plan does not assign, so no region could parse it.
- appears in
- reason
- credits
- Free. Invalid numbers never cost a credit.
What it means
Country calling codes are assigned by the ITU; leading digits that match none of them cannot belong to any plan. This usually means a typo in the prefix, a national trunk 0 left in place after the plus (+0 20 …), or digits that were never a phone number.
What to do
Check the prefix: drop a national trunk 0 after the calling code, or ask the user to re-enter the number with the correct country.
Example response
{
"valid": false,
"reason": "invalid_country_code",
"e164": null,
"country": null,
"risk_score": null
}Abbreviated: a real answer carries all 33 fields, listed in the validate-phone reference.
Related
- missing_country · no country was given, and the input does not carry one
- too_short · fewer digits than any number in that plan
- too_long · more digits than any number in that plan
- not_a_number · the input does not look like a phone number
- invalid_length · a digit count the plan never uses
- invalid_number · the right length, but not assignable under the plan
- unassigned_block · the regulator has not allocated the block the number sits in
- emergency_number · an emergency number, not a subscriber line
- short_number · a short code or service number, not a subscriber line
- All verdict reasons
- Phone fields and the risk score
- API reference
markdown version: /docs/reasons/invalid_country_code.md