Phone Number Validator

About

This app is a US phone number-validating RubyGem.

Installing

$ gem install phone_number_validator

Install Required Gems/Dependencies

$ bundle install

Updateing Required Gems/Dependencies

$ bundle update

Uninstalling

$ gem uninstall phone_number_validator

Testing

$ rake test

Usage

In command line

$ phone_number_validator '+1 (949) 355-6244 ext. 198842'
=> '+1 (949) 355-6244 ext. 198842' is a valid phone number.'
=> true

In Ruby code

require 'phone_number_validator'

check_phone_number = PhoneNumberValidator.validate_phone_number('+1 (949) 355-6244 ext. 198842')

print(check_phone_number)

Output

=> '+1 (949) 355-6244 ext. 198842' is a valid phone number.'
=> true