{"_rev":"11-d3f8b121653c63d8821dd080530024a8","time":{"created":"2023-10-26T21:00:21.523Z","1.0.4":"2023-10-05T18:16:10.281Z","modified":"2023-10-26T21:00:22.104Z","1.0.1":"2023-10-24T10:48:34.733Z","1.0.5":"2023-10-24T10:52:32.670Z","1.0.6":"2023-10-26T19:29:41.585Z","1.0.7":"2023-10-26T20:49:36.823Z","1.0.8":"2023-10-26T21:00:21.779Z"},"_id":"@berlinsms/phonenumber-validator","name":"@berlinsms/phonenumber-validator","dist-tags":{"latest":"1.0.8"},"versions":{"1.0.8":{"name":"@berlinsms/phonenumber-validator","version":"1.0.8","publishConfig":{"access":"public"},"description":"jquery-plugin to verify a phonenumber direct in the formular.","scripts":{"build":"webpack --mode production","minify":"webpack --mode development","deploy":"npm run build && svn commit && git push && npm login && npm unpublish @berlinsms/phonenumber-validator --force && npm deprecate @berlinsms/phonenumber-validator --force && npm publish --access public"},"keywords":["js","phonenumber","validate","live","online","browser","jquery"],"author":{"name":"haka for berlinsms","email":"service@berlinsms.de","url":"https://www.berlinsms.de"},"license":"MIT","devDependencies":{"css-loader":"^6.8.1","style-loader":"^3.3.3","webpack":"^5.88.2","webpack-cli":"^4.10.0"},"dependencies":{"@berlinsms/captcha-wrapper":"^1.0.4","@berlinsms/code-picker":"^1.0.7","@berlinsms/country-picker":"^1.0.5","@berlinsms/overlay":"^1.0.4"},"gitHead":"ecca188e2b018f5d9799fbf00ce5371b4f36a858","_id":"@berlinsms/phonenumber-validator@1.0.8","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-kwgSrdbDfKI+VnqgJ/xIfSzgeU3CeBd1fEAvtu4PyvBq+jzmG4W+yyvmNAP0U8HbxgmAROQ5L/H2MIHEdbNknQ==","shasum":"7d29ea22b3c0aaadc68dadf0c8f0bcb47149735a","tarball":"https://registry.npmjs.org/@berlinsms/phonenumber-validator/-/phonenumber-validator-1.0.8.tgz","fileCount":9,"unpackedSize":95281,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDn3lwGDHO0Cztr3XEfmNMIaf7qtrBDJ0T4zk8m3iJRUAiAAvzAGVVmruacp7d+0nTRh95/V01mf8dfsCY1ioNknXw=="}]},"_npmUser":{"name":"berlinsms-dev","email":"service@berlinsms.de"},"directories":{},"maintainers":[{"name":"berlinsms-dev","email":"service@berlinsms.de"},{"name":"alexw_berlinsms","email":"alexander.weise@berlinsms.de"},{"name":"hagen.meutzner","email":"meutzner@kreckow.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/phonenumber-validator_1.0.8_1698354021595_0.7405393979180759"},"_hasShrinkwrap":false}},"maintainers":[{"name":"berlinsms-dev","email":"service@berlinsms.de"},{"name":"alexw_berlinsms","email":"alexander.weise@berlinsms.de"},{"name":"hagen.meutzner","email":"meutzner@kreckow.de"}],"description":"jquery-plugin to verify a phonenumber direct in the formular.","keywords":["js","phonenumber","validate","live","online","browser","jquery"],"author":{"name":"haka for berlinsms","email":"service@berlinsms.de","url":"https://www.berlinsms.de"},"license":"MIT","readme":"# jQuery PhonenumberValidator\r\n[Homepage](https://www.berlinsms.de/)\r\n\r\n# Description\r\nA jquery-plugin to verify a phonenumber direct in the formular.\r\n\r\nThe user can enter his phone number in the form.\r\n\r\nBerlinSMS will send a code to this number.\r\n\r\nThe user receives this code via SMS and has to enter it again on the website.\r\n\r\nIf the code is correct, the frontend receives a callback and a token.\r\n\r\nThe token can be used to check the validity in the backend.\r\n\r\n# Usage\r\n\r\nDownload bsms-phonenumber-validator.js\r\n```link\r\nhttps://static.berlinsms.de/toolsforcoder/phonenumber-validator/dist/bsms-phonenumber-validator.min.js\r\n```\r\n\r\nInclude jquery and bsms-phonenumber-validator.js\r\n```html\r\n<script src=\"https://code.jquery.com/jquery-3.6.0.min.js\"></script>\r\n<script src=\"bsms-phonenumber-validator.min.js\"></script>\r\n```\r\n\r\nFind your jquery-container and assign phonenumber-validator\r\n```js\r\n$('.plugin-container').bsmsPhonenumberValidator();    \r\n```\r\n\r\nMake sure, the script is fully loaded, before you assign phonenumber-validator, e.g. use jquerys 'ready'\r\n```js\r\n$(document).ready(function () {\r\n    $('.plugin-container').bsmsPhonenumberValidator();\r\n});    \r\n```\r\n\r\nAdd options, if needed:\r\n```js\r\n$(document).ready(()=>{\r\n\t$('.phonenumber-validator-container').bsmsPhonenumberValidator({\r\n\t\tcountries: { \r\n\t\t\t\"AT\": { name:\"�sterreich\",  code:\"+43\"} ,\r\n\t\t\t\"DE\": { name:\"Deutschland\", code:\"+49\"}, \r\n\t\t\t\"CH\": { name:\"Schweiz\",     code:\"+41\"}, \r\n\t\t}, \r\n\t\tdefaultCountry: \"DE\"\r\n\t});\r\n});   \r\n```\r\n\r\nAdd callbacks, if needed:\r\n```js\r\n$(document).ready(function() {\r\n\t$('.phonenumber-validator-container').bsmsPhonenumberValidator({\r\n\t\tonSolved:onSolvedCallback\r\n\t});\r\n});   \r\nfunction onSolvedCallback() {\r\n\talert('Phonenumber validated');\r\n}\r\n```\r\n\r\n# Options\r\n\r\n| Option               | DESCRIPTION                                                                                                                                       | DEFAULT                               |\r\n|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------|\r\n| inputNamePhonenumber | Name attribute of a hidden input tag. The plugin adds it to the form and writes the phonenumber into the value                                    | bsms-phonenumber                      |\r\n| inputNameToken       | Name attribute of a hidden input tag. The plugin adds it to the form and writes the challenge token into the value                                | bsms-challenge-token                  |\r\n| countries            | Dictionary of available countries, each key must be an uniqued identifier of a country, values are dictionaries with name and code of the country | {\"DE\": { name:\"Germany\", code:\"+49\"}} |\r\n| defaultCountry       | Identifier of a country that ist initially selected must be a key in the country dictionary                                                       | DE                                    |\r\n| defaultLocalnumber   | Localpart of a phonenumber that is initially displayed                                                                                            |                                       |\r\n| twofaSitekey         | twofaSitekey given by berlinsms (https://www.berlinsms.de/dokumentation/sitekey-secretkey-generieren/)                                            |                                       |\r\n| onLoad               | Callback that fires when the validator has loaded                                                                                                 | null                                  |\r\n| onSolved             | Callback that is triggered when the phonenumber is validated                                                                                      | null                                  |\r\n| onExpired            | Callback triggered when the validation-time expires                                                                                               | null                                  |\r\n| onError              | Callback, will be triggered, if something is wrong                                                                                                | null                                  | \r\n| showCredits          | shows credits                                                                                                                                     | true                                  |\r\n","readmeFilename":"README.md"}