Artisan SVG > Phone Number Helpers (phone-number-helpers) (phone-3)

Phone Number Helper
2.0

The Phone Number Helper helps you interact with phone numbers

Overview
Copy

The Phone Number Helper provides operations which can help you deal with international formatting, and to check validity and details about a number.

Basic Operations List
Copy

  • Format Phone Number

  • Get details

Format Phone Number
Copy

Given a country and a phone number, this operation will return a phone number with the country code in the desired format.

  • International

  • National

  • e164

  • rfc3966

  • significant

Example
Copy

Get Details
Copy

Takes a phone number provides some additional information about it. For example:

  • Returns the phone number on all the formats explained on the previous operation.

  • Returns the region code.

  • Returns true if it is a valid phone number, or false if it is not.

  • Returns true if it can be internationally dialled or false if it can not.

  • Returns if it is mobile number or a fixed line number.