User Tools

Site Tools


javascript:validate-phonenumbers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
javascript:validate-phonenumbers [2022/03/16 14:51] – created Wulf Rajekjavascript:validate-phonenumbers [2023/05/29 11:55] (current) – external edit 127.0.0.1
Line 9: Line 9:
 Gitlab: Gitlab:
 https://gitlab.com/catamphetamine/libphonenumber-js https://gitlab.com/catamphetamine/libphonenumber-js
 +
 +
 +Example:
 +<code>
 +<html>
 +    <head>
 +        <title>libphonenumber-js</title>
 +        <meta charset="UTF-8">
 +
 +        <!--        <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>
 +
 +</code>
javascript/validate-phonenumbers.1647442313.txt.gz · Last modified: 2023/05/29 11:53 (external edit)