Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Ruby library for validating and formatting UK phone numbers.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
CHANGELOG.md
Gemfile
LICENSE
README.md
uk_phone_numbers.gemspec

README.md

uk_phone_numbers

A Ruby library for validating and formatting UK phone numbers.

Installation

$ gem install uk_phone_numbers

Usage

Validating a phone number

require 'uk_phone_numbers'

UKPhoneNumbers.valid? "02087123456"
# => true

Formatting a phone number

require 'uk_phone_numbers'

UKPhoneNumbers.format "02087123456"
# => "020 8712 3456"
Something went wrong with that request. Please try again.