A Ruby library for validating and formatting UK phone numbers.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
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"