Sha256: f9410603fb7000db1704e3f186186134a48c962e9b16e9e8c1c53148562bd2ef

Contents?: true

Size: 542 Bytes

Versions: 20

Compression:

Stored size: 542 Bytes

Contents

class PhoneNumberValidator
  class << self
    # Validate any United States phone number!
    #
    # Example:
    #   >> PhoneNumberValidator.validate_phone_number('+1 (949) 355-6244 ext. 198842')
    #   => '+1 (949) 355-6244 ext. 198842' is a valid phone number.'
    #   => true
    #
    # Arguments:
    #   phone_no: (String)
    def validate_phone_number(phone_number)
      validator = Validator.new(phone_number)
      validator.validate_phone_number
    end
  end
end

require 'phone_number_validator/validator'

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
phone_number_validator-0.2.1 lib/phone_number_validator.rb
phone_number_validator-0.2.0 lib/phone_number_validator.rb
phone_number_validator-0.1.9 lib/phone_number_validator.rb
phone_number_validator-0.1.8 lib/phone_number_validator.rb
phone_number_validator-0.1.7 lib/phone_number_validator.rb
phone_number_validator-0.1.6 lib/phone_number_validator.rb
phone_number_validator-0.1.5 lib/phone_number_validator.rb
phone_number_validator-0.1.4 lib/phone_number_validator.rb
phone_number_validator-0.1.3 lib/phone_number_validator.rb
phone_number_validator-0.1.2 lib/phone_number_validator.rb
phone_number_validator-0.1.1 lib/phone_number_validator.rb
phone_number_validator-0.1.0 lib/phone_number_validator.rb
phone_number_validator-0.0.9 lib/phone_number_validator.rb
phone_number_validator-0.0.8 lib/phone_number_validator.rb
phone_number_validator-0.0.7 lib/phone_number_validator.rb
phone_number_validator-0.0.6 lib/phone_number_validator.rb
phone_number_validator-0.0.5 lib/phone_number_validator.rb
phone_number_validator-0.0.4 lib/phone_number_validator.rb
phone_number_validator-0.0.3 lib/phone_number_validator.rb
phone_number_validator-0.0.2 lib/phone_number_validator.rb