Phone Number icon

Phone Number

Parse, format, and validate phone numbers (libphonenumber-js)

Validate

AI-generated

Summary

Validate a phone number's correctness and extract basic details including its country and type.

Inputs

  • Phone Number (required) — The phone number to validate. Include the international prefix (e.g., +40) or set a default country if the prefix is missing.
  • Default Country — ISO 3166-1 alpha-2 code to assume when the phone number lacks an international prefix. Leave empty if all numbers include their country code.
  • Options — Optionally set 'Continue On Invalid' to return an output with isValid=false instead of throwing an error if the phone number cannot be parsed.

Output shape

a single JSON object per input item indicating the validation result

Each output includes 'input' (the phone number), 'isValid' (boolean), and if valid, the 'country' code and phone 'type'. If invalid and 'Continue On Invalid' is false, the node throws an error; otherwise, it outputs isValid=false with an error message.

Links

Discussion