GET /v1/phone-validateValidate phone number format
Validation Utils lf-validation-utils
Checks whether a phone number is written in a valid format. Validate phone number format
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
phone | string | Yes | Phone number |
country | string | No | ISO 3166-1 alpha-2 country code |
Response Schema
valid (boolean): Whether the number is valid
formatted (string): E.164-ish formatted number
country_code (string): Dialing code
national (string): National number
country (string): Country name
cURL Example
curl 'https://lf-validation-utils.laminarforge.dev/v1/phone-validate?phone=<phone>' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-validation-utils.laminarforge.dev/v1/phone-validate'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'phone': '<phone>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())