+ Start a Discussion

Anyone written a class to use libphonenumber?

The libphonenumber code library does a good job normalising and formatting phone numbers to national or international standards - not just for the North American zone but worldwide. Has anyone incorporated the JS version into an Apex class? If so, would you be wiling to post a code sample? This topics seems a bit of a gap in developerforce.




Have you find a solution to this point ?





Not yet.

I should rather have asked, has anybody stored the Javascript version of libphonenumber as a static resource and used it to add phone validation/formatting correction to Visualforce pages. We are having a go with that just now but I'd be interested to hearn from others' experiences.

Did you have any luck getting this to work?
Dmitriy JediDmitriy Jedi
https://github.com/kumarrk21/ZPhoneFormatter - ZPhoneFormatter.js file, Works fine for VF
Igor Petrovych 4Igor Petrovych 4
Hey! Replied in your trailbrazer's thread, but also letting everyone know here. We have ported the libphonenumber library to Salesforce (Apex) and it's available for free (https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000G12oJUAR). Since it's an apex solution you can use it and make any custom component you'd like to format/validate your number. In case you have any issues or need some help don't hesitate to contact me or our team at Noltic (https://noltic.com/).