https://github.com/mdp/will_it_dial
A paranoid phone number validator
https://github.com/mdp/will_it_dial
Last synced: over 1 year ago
JSON representation
A paranoid phone number validator
- Host: GitHub
- URL: https://github.com/mdp/will_it_dial
- Owner: mdp
- License: mit
- Created: 2010-01-22T17:08:16.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2010-01-22T20:36:08.000Z (over 16 years ago)
- Last Synced: 2025-01-23T12:14:51.719Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 78.1 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
# Will It Dial
A simple customer phone number validator for lead validation. It's pretty paranoid and will not allow numbers that seem highly unlikely but are technically valid.
WillItDial::US.check('404-514-6858') => true
WillItDial::US.check('1-404-514-6858') => true
WillItDial::US.check('404-555-5555') => false # Suspcious
WillItDial::US.check('404-154-7372') => false # Can't start exchange code with 1
WillItDial::US.check('404-054-7372') => false # Can't start exchange code with 0
WillItDial::US.check('404-404-0404') => false # Suspicious, only 2 unique digits
WillItDial::US.check('404-555-1212') => false # Explicitly banned
WillItDial::US.check('247-464-2039') => false # Fake area code
Defaults to US
WillItDial('404-332-1494') => true
## Installation
gem install will_it_dial
## Todo
* Better configuration options, increase or decrease paranoia
* Build an international version
## Copyright
Copyright (c) 2010 Mark Percival. See LICENSE for details.