Validate Phone
validate_phoneValidate & parse a phone number against the E.164 / ITU calling-code plan (keyless, offline). Detects the country, normalizes to E.164, and checks the national-number length is plausible. Pass an international number (e.g. "+33 1 23 45 67 89") OR a national number plus a country ISO code (e.g. phone="020 7946 0958", country="GB"). Does NOT determine carrier or mobile-vs-landline (that needs a keyed HLR lookup).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phone | Yes | The phone number to validate (international "+.." form, or national form with `country`). | |
| country | No | Optional ISO 3166 alpha-2 country code (e.g. "US", "GB", "DE") used when `phone` is in national (non-+) form. |