invalid_length
A digit count the plan never uses
The number is neither too short nor too long overall, but its length is one the numbering plan does not assign to any number type.
- appears in
- reason
- credits
- Free. Invalid numbers never cost a credit.
What it means
Some plans assign several lengths, for example eight and ten digits, with nothing in between; a nine-digit number under such a plan can exist under no type. This is almost always a dropped or doubled digit.
What to do
Check for a dropped or doubled digit; the valid lengths per country are published in the libphonenumber metadata named in sources.
Example response
{
"valid": false,
"reason": "invalid_length",
"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
- invalid_country_code · the calling code after the + is not assigned to any country
- 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_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_length.md