{"_id":"jquery.maskedinput","_rev":"14-743d6dd6b7d08fc4f32f34cefedd1c3b","name":"jquery.maskedinput","description":"jQuery Masked Input Plugin","dist-tags":{"latest":"1.4.1"},"versions":{"1.4.1":{"name":"jquery.maskedinput","version":"1.4.1","author":{"name":"Josh Bush","url":"digitalbush.com"},"description":"jQuery Masked Input Plugin","devDependencies":{"grunt":"0.4.x","grunt-contrib-jasmine":"0.5.x","grunt-contrib-uglify":"0.2.x","grunt-contrib-watch":"0.5.x","grunt-nuget":"^0.1.4"},"scripts":{"test":"grunt test"},"main":"gruntfile.js","repository":{"type":"git","url":"git+https://github.com/excellalabs/jquery.maskedinput.git"},"keywords":["jQuery","Masked","Input","Plugin"],"license":"MIT","bugs":{"url":"https://github.com/excellalabs/jquery.maskedinput/issues"},"homepage":"https://github.com/excellalabs/jquery.maskedinput#readme","gitHead":"bb66bf9b1c3eddd1d2349cee103127ae08d0a877","_id":"jquery.maskedinput@1.4.1","_shasum":"3ea8f4cdc4eafce7354c27b66a73d0f44defc327","_from":".","_npmVersion":"2.13.0","_nodeVersion":"4.1.1","_npmUser":{"name":"excellalabs","email":"labs@excella.com"},"dist":{"shasum":"3ea8f4cdc4eafce7354c27b66a73d0f44defc327","tarball":"https://registry.npmjs.org/jquery.maskedinput/-/jquery.maskedinput-1.4.1.tgz","integrity":"sha512-d4GmaVsN/2E38G3yAZXvBmAlVWuxhYOng/hfFy3pyr9O1CgzfqRJ3nR+DTuxusLOi5EKoA5Jw6YBHRd+BCQYAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICoxJWf8SXOINASHtkR8UUdGvY3V3ftl6Y/CdnPeUk7WAiBx3tpLPVCUb5HcmpWxapDqnyDhnGgCaJtiO7KV249cqg=="}]},"maintainers":[{"name":"excellalabs","email":"labs@excella.com"}],"directories":{}}},"readme":"Masked Input Plugin for jQuery\n==============================\n[![Build Status](https://travis-ci.org/digitalBush/jquery.maskedinput.png)](https://travis-ci.org/digitalBush/jquery.maskedinput)\nOverview\n--------\nThis is a masked input plugin for the jQuery javascript library. It allows a user to more easily enter fixed width input where you would like them to enter the data in a certain format (dates,phone numbers, etc). It has been tested on Internet Explorer, Firefox, Safari, Opera, and Chrome.  A mask is defined by a format made up of mask literals and mask definitions. Any character not in the definitions list below is considered a mask literal. Mask literals will be automatically entered for the user as they type and will not be able to be removed by the user.The following mask definitions are predefined:\n\n* a - Represents an alpha character (A-Z,a-z)\n* 9 - Represents a numeric character (0-9)\n* \\* - Represents an alphanumeric character (A-Z,a-z,0-9)\n\n### Usage\nFirst, include the jQuery and masked input javascript files.\n\n```html\n<script src=\"jquery.js\" type=\"text/javascript\"></script>\n<script src=\"jquery.maskedinput.js\" type=\"text/javascript\"></script>\n```\n\nNext, call the mask function for those items you wish to have masked.\n\n```html\njQuery(function($){\n   $(\"#date\").mask(\"99/99/9999\");\n   $(\"#phone\").mask(\"(999) 999-9999\");\n   $(\"#tin\").mask(\"99-9999999\");\n   $(\"#ssn\").mask(\"999-99-9999\");\n});\n```\n\nOptionally, if you are not satisfied with the underscore ('_') character as a placeholder, you may pass an optional argument to the maskedinput method.\n\n```html\njQuery(function($){\n   $(\"#product\").mask(\"99/99/9999\",{placeholder:\" \"});\n});\n```\n\nOptionally, if you would like to execute a function once the mask has been completed, you can specify that function as an optional argument to the maskedinput method.\n\n```html\njQuery(function($){\n   $(\"#product\").mask(\"99/99/9999\",{completed:function(){alert(\"You typed the following: \"+this.val());}});\n});\n```\n\nOptionally, if you would like to disable the automatic discarding of the uncomplete input, you may pass an optional argument to the maskedinput method\n```html\njQuery(function($){\n   $(\"#product\").mask(\"99/99/9999\",{autoclear: false});\n});\n```\n\nYou can now supply your own mask definitions.\n```html\njQuery(function($){\n   $.mask.definitions['~']='[+-]';\n   $(\"#eyescript\").mask(\"~9.99 ~9.99 999\");\n});\n```\n\nYou can have part of your mask be optional. Anything listed after '?' within the mask is considered optional user input. The common example for this is phone number + optional extension.\n\n```html\njQuery(function($){\n   $(\"#phone\").mask(\"(999) 999-9999? x99999\");\n});\n```\n\nIf your requirements aren't met by the predefined placeholders, you can always add your own. For example, maybe you need a mask to only allow hexadecimal characters. You can add your own definition for a placeholder, say 'h', like so: `$.mask.definitions['h'] = \"[A-Fa-f0-9]\";` Then you can use that to mask for something like css colors in hex with a `mask \"#hhhhhh\"`.\n\n```html\njQuery(function($){\n   $(\"#phone\").mask(\"#hhhhhh\");\n});\n```\n\n\nBy design, this plugin will reject input which doesn't complete the mask. You can bypass this by using a '?' character at the position where you would like to consider input optional. For example, a mask of \"(999) 999-9999? x99999\" would require only the first 10 digits of a phone number with extension being optional.\n\n\nGetting the bits\n----------------\nWe generally recommend that you use [bower](http://bower.io) to install jquery.maskedinput plugin.\n\n    $ bower install --save jquery.maskedinput\n\n\nSetting up your Developer Environment\n-------------------------------------\njQuery Masked Input uses [NodeJS](http://www.nodejs.org) and [GruntJS](http://www.gruntjs.com) as it's developer platform and build automation tool.\n\nTo get your environment setup correctly, you'll need nodejs version 0.8.25 or greater installed. You'll also need to install the grunt command line tool:\n\n    $ sudo npm install -g grunt-cli\n\nOnce node is installed on your system all that you need to do is install the developer dependencies and run the grunt build:\n\n    $ npm install\n    $ grunt\n\nAll of the tests for jQuery Masked Input are run using the [jasmine](http://jasmine.github.io/) test runner.\n","maintainers":[{"name":"excellalabs-admin","email":"labs@excella.com"}],"time":{"modified":"2022-06-19T05:21:38.232Z","created":"2015-10-01T20:10:03.096Z","1.4.1":"2015-10-01T20:10:03.096Z"},"homepage":"https://github.com/excellalabs/jquery.maskedinput#readme","keywords":["jQuery","Masked","Input","Plugin"],"repository":{"type":"git","url":"git+https://github.com/excellalabs/jquery.maskedinput.git"},"author":{"name":"Josh Bush","url":"digitalbush.com"},"bugs":{"url":"https://github.com/excellalabs/jquery.maskedinput/issues"},"license":"MIT","readmeFilename":"README.md","users":{"lmhs":true,"malitov":true,"ungurys":true,"keepon99":true,"chinawolf_wyp":true,"rmzxcm":true,"ma4ine":true,"agplan":true,"gustavorglima":true,"deyvisonrocha":true}}