Comments (1)
You're very welcome!
I want to start off by saying this is my first attempt at open sourcing. I basically built this to suit my own needs and someone said I should put it up on github. This code was initially thrown together for my own use, then I went through and cleaned it up when I put it on Github.
I don't exactly know off the top of my head why I sanitize the number. It may not be necessary. It's possible that libphonenumber required it to be sanitized in the past. I just don't know.
I hope to one day really clean this up.
Thanks for the encouragement I do appreciate it.
- Al
—
Sent from Mailbox for iPhone
On Sat, Dec 14, 2013 at 12:23 PM, newoga [email protected] wrote:
First, thanks much @albeebe for putting this together. Definitely saved me a lot of time.
Quick question: Is there any special reason why we are sanitizing the raw input of non numeric characters with thecleanPhone()
method as opposed to just allowing libphonenumber to determine whether or not the phone number is valid?One use case where allowing characters in the input would be useful is when you have a number like 1-800-CONTACT (1-800-266-8228) or 1-800-ASK-USPS (1-800-275-8777). Google's libphonenumber actually parses characters using the correct corresponding digit and let's you know if it is valid or not (both valid in this case).
Reply to this email directly or view it on GitHub:
#8
from phoneformat.js.
Related Issues (20)
- Germany number validation error
- bower install phoneformat.js#1.0.0 --save fails HOT 2
- Phoneformat api is duplicated in js files HOT 5
- bower installs incorrect version of phoneformat HOT 1
- Need to add to Bower.IO HOT 3
- Make package.json compatible with npm HOT 5
- Wrap this lib in a module HOT 3
- International format does not prefix the country code
- False verification prefix HOT 1
- Add a license file HOT 1
- Conflict with i18n library HOT 5
- Documentation should note to use 2-digit letter ISO country code, not numeric
- Not detecting the USA prefix '+1' HOT 1
- Is there a way to get a smaller version of this library? HOT 1
- phoneformat.com HOT 6
- Minimised version will throw error HOT 1
- Incorrect phone number valiadtion
- US Area Code 463 is not returning as a valid number
- US Area Code 279 is not returning as a valid number
- can't bundle with Webpack 4 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phoneformat.js.