1. Handlebars Helpers
  2. Format Phone Number

Handlebars Helpers

Format Phone Number

Formats a phone number into E.164 format

Uses

  • Use this to clean numbers coming from a form or other source to ensure they are in a consistent format.

Usage

Helper name : format_phone_number

Parameter Description
1 The input phone number to format
2 The default country code to use if the number does not have one
3 Whether to include the plus sign in the output

eg. {{#format_phone_number input_number default_country_code include_plus}}{{/format_phone_number}}

Examples

Format number with default country code +1

Example

loading...

Substituted definition

loading...

Format international number with default country code +1

Example

loading...

Substituted definition

loading...