javascript:validate-phonenumbers
This is an old revision of the document!
Validate Phonenumbers
https://www.npmjs.com/package/libphonenumber-js
Demo:
https://catamphetamine.gitlab.io/libphonenumber-js/
Gitlab:
https://gitlab.com/catamphetamine/libphonenumber-js
Example:
<html> <head> <title>libphonenumber-js</title> <!-- <script src="https://unpkg.com/libphonenumber-js@[version]/bundle/libphonenumber-[type].js"></script> --> <script src="https://unpkg.com/libphonenumber-js@1.x/bundle/libphonenumber-min.js"></script> </head> <body> <script> checknumber = libphonenumber.parsePhoneNumber('00 44 1234 567 890','GB') alert(checknumber.country+" "+checknumber.formatInternational() + " Valid:"+checknumber.isValid() + " Possible:"+checknumber.isPossible()) </script> </body> </html>
javascript/validate-phonenumbers.1647445753.txt.gz · Last modified: 2023/05/29 11:53 (external edit)