6 ms·
Ha, good to see this here - so incredibly useful, and already ported to lots of useful languages. Handling phone numbers gets messy really quickly: formatting/v
by jackocnr 12y ago
Ha, good to see this here - so incredibly useful, and already ported to lots of useful languages. Handling phone numbers gets messy really quickly: formatting/validation for national/international numbers, in different forms (land-line/mobile/premium etc), in hundreds of different countries... These guys have done a great job, and are also super responsive/helpful when you raise issues.
A word of warning: if you ever set out to handle international numbers in a web frontend - you may think "it can't be that hard - maybe take me a couple of hours" (like me), then do yourself a favour and save yourself a week of unexpected work and use the jQuery plugin that I ended up creating (I don't understand why this didn't already exist) which uses libphonenumber for all the magic: https://github.com/Bluefieldscom/intl-tel-input https://github.com/Bluefieldscom/intl-tel-input. Hope it saves you some time.
- ceejayoz 12y agoThat looks amazing.
- thesumofall 12y agoExactly what I was looking for! Thanks!
- jypepin 12y agoI did phone numbers validation in the front end, and I yes the expected couple hours ended up being multiple days of works and I ended up using google's validator! thanks for the jquery plugin, I'll definitely keep it in mind!
- umanwizard 12y agoLooks awesome; will consider using this in the future. One note: it would be nice if you explicitly stated, in the LICENSE file or the readme, that this is under the MIT license. It'd make it easier to use this at companies (like mine) where open source packages can only be used if their license is on a legal-department-approved whitelist.
- XtianThrowaway 12y agoPlease make this a node package at some point.
- ruimarinho 12y agoI have created a node package a couple of months ago which I regularly keep up-to-date with the latest upstream changes. It exports everything that the javascript version of libphonenumber offers. You can check it at http://seegno.github.io/google-libphonenumber/ http://seegno.github.io/google-libphonenumber/.