{"id":15025656,"url":"https://github.com/igorescobar/jquery-mask-plugin","last_synced_at":"2025-05-13T17:08:52.160Z","repository":{"id":2682051,"uuid":"3674459","full_name":"igorescobar/jQuery-Mask-Plugin","owner":"igorescobar","description":"A jQuery Plugin to make masks on form fields and HTML elements.","archived":false,"fork":false,"pushed_at":"2022-12-07T17:38:05.000Z","size":1541,"stargazers_count":4782,"open_issues_count":120,"forks_count":1417,"subscribers_count":156,"default_branch":"master","last_synced_at":"2025-05-09T14:34:44.535Z","etag":null,"topics":["html-element","javascript","jquery-mask-plugin","jquery-plugin","mask"],"latest_commit_sha":null,"homepage":"http://igorescobar.github.io/jQuery-Mask-Plugin/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/igorescobar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-09T20:25:25.000Z","updated_at":"2025-05-05T23:05:51.000Z","dependencies_parsed_at":"2022-07-12T14:58:58.913Z","dependency_job_id":null,"html_url":"https://github.com/igorescobar/jQuery-Mask-Plugin","commit_stats":null,"previous_names":[],"tags_count":140,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorescobar%2FjQuery-Mask-Plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorescobar%2FjQuery-Mask-Plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorescobar%2FjQuery-Mask-Plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorescobar%2FjQuery-Mask-Plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igorescobar","download_url":"https://codeload.github.com/igorescobar/jQuery-Mask-Plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990468,"owners_count":21995774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html-element","javascript","jquery-mask-plugin","jquery-plugin","mask"],"created_at":"2024-09-24T20:02:46.758Z","updated_at":"2025-05-13T17:08:52.113Z","avatar_url":"https://github.com/igorescobar.png","language":"JavaScript","readme":"# jQuery Mask Plugin\nA jQuery Plugin to make masks on form fields and HTML elements.\n\n[![Build Status](https://travis-ci.org/igorescobar/jQuery-Mask-Plugin.png)](https://travis-ci.org/igorescobar/jQuery-Mask-Plugin)\n[![Code Climate](https://codeclimate.com/github/igorescobar/jQuery-Mask-Plugin.png)](https://codeclimate.com/github/igorescobar/jQuery-Mask-Plugin)\n[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/jquery-mask-plugin/badge?style=rounded)](https://www.jsdelivr.com/package/npm/jquery-mask-plugin)\n[![CDNJS](https://img.shields.io/cdnjs/v/jquery.mask.svg)](https://cdnjs.com/libraries/jquery.mask)\n\n# Documentation, Demos \u0026 Usage Examples\nhttps://igorescobar.github.io/jQuery-Mask-Plugin/\n\n## Features\n\n  * Lightweight (~2kb minified, ~1kb gziped).\n  * Built-in support for dynamically added elements.\n  * Masks on any HTML element (no need to server-side mask anymore!)!\n  * HTML notation support (data-mask, data-mask-recursive, data-mask-clearifnotmatch).\n  * String/Numeric/Alpha/Mixed masks.\n  * Reverse mask support for masks on numeric fields.\n  * Sanitization.\n  * Optional digits.\n  * Recursive Digits.\n  * Fallback Digits.\n  * Advanced mask initialization.\n  * Advanced Callbacks.\n  * On-the-fly mask change.\n  * Mask removal.\n  * Full customization.\n  * Compatibility with React/UMD/Zepto.js/Angular.JS.\n  * HTML5 placeholder support.\n  * Clear the field if it not matches support.\n\n## Want to buy me a beer? :heart_eyes:\nhttp://paypal.me/igorcescobar\n\n## Install it via Package Managers\n### Bower\n`bower install jquery-mask-plugin`\n### NPM\n`npm i jquery-mask-plugin`\n### Meteor\n`meteor add igorescobar:jquery-mask-plugin`\n### Packagist/Composer\n`composer require igorescobar/jquery-mask-plugin`\n\n## CDNs\n### CDNjs\nhttps://cdnjs.com/libraries/jquery.mask\n### JSDelivr\nhttp://www.jsdelivr.com/projects/jquery.mask\n\n## RubyGems\n```ruby\ngem 'jquery_mask_rails' # more details at http://bit.ly/jquery-mask-gem\n```\n\n## Tutorials\n### English\n  * [Masks with jQuery Mask Plugin](http://bit.ly/masks-with-jquery-mask-plugin)\n  * [Using jQuery Mask Plugin With Zepto.js](http://bit.ly/using-jquery-mask-plugin-with-zeptojs)\n\n### Portuguese\n  * [Mascaras com JQuery Mask Plugin](http://bit.ly/mascaras-com-jquery-mask-plugin)\n  * [Mascara Javascript para os novos telefones de São Paulo](http://bit.ly/mascara-javascript-para-os-novos-telefones-de-sao-paulo)\n\n### Fun (or not) facts\n  * [I’ve had the chance to troll Donald Trump. But I didn’t.](http://www.igorescobar.com/blog/2016/08/21/ive-the-chance-to-troll-donald-trump-but-i-didnt/)\n\n## Compatibility\njQuery Mask Plugin has been tested with jQuery 1.7+ on all major browsers:\n\n * Firefox 2+ (Win, Mac, Linux);\n * IE7+ (Win);\n * Chrome 6+ (Win, Mac, Linux, Android, iPhone);\n * Safari 3.2+ (Win, Mac, iPhone);\n * Opera 8+ (Win, Mac, Linux, Android, iPhone).\n * Android Default Browser v4+\n\n## Typescript support\nDefinition can be found [here](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jquery-mask-plugin).\n\nTo install, open terminal and navigate to your working directory.\n\n### Typescript 1.x users\n  * Install [typings](https://github.com/typings/typings) by running `npm install typings --global`.\n  * Then install the definition by running `typings install dt~jquery-mask-plugin --global --save`.\n### Typescript 2.x users\n  * Use npm `npm install --save-dev @types/jquery-mask-plugin`.\n\nFor configuration options and troubleshooting refer to these repositories:\n* [Typings](https://github.com/typings/typings)\n* [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped)\n* [Typescript](https://github.com/Microsoft/TypeScript)\n\n\n## Problems or Questions?\nBefore opening a new [issue](https://github.com/igorescobar/jQuery-Mask-Plugin/issues) take a look on those frequently asked questions:\n#### [How to integrate with React.js?](https://github.com/igorescobar/jQuery-Mask-Plugin/issues/498)\n#### [How to integrate with Angular.js?](https://github.com/igorescobar/jQuery-Mask-Plugin/issues/499)\n#### [How to integrate with Vue.js?](https://github.com/ankurk91/vue-jquery-mask)\n#### [Problems with old versions of Android keyboard](https://github.com/igorescobar/jQuery-Mask-Plugin/issues/135)\n#### [Negative numbers, or currency related problems](https://github.com/igorescobar/jQuery-Mask-Plugin/issues/436#issuecomment-253176511)\n#### [Prefix or sufix on the Mask](https://github.com/igorescobar/jQuery-Mask-Plugin/issues/166)\n#### [Add validation?](https://github.com/igorescobar/jQuery-Mask-Plugin/issues/387#issuecomment-192998092)\n#### [Field type number, email not working?](https://github.com/igorescobar/jQuery-Mask-Plugin/issues/450#issuecomment-253225719)\n#### [Want to keep the placeholder as the user types?](https://github.com/igorescobar/jQuery-Mask-Plugin/issues/633#issuecomment-350819224)\n#### [E-mail mask?](https://github.com/igorescobar/jQuery-Mask-Plugin/issues/582)\n\n## Bugs?\nDid you read our [docs](https://igorescobar.github.io/jQuery-Mask-Plugin/docs.html)? Yes? Cool! So now... make sure that you have a *functional* [jsfiddle](http://jsfiddle.net/) exemplifying your problem and open an [issue](https://github.com/igorescobar/jQuery-Mask-Plugin/issues) for us. Don't know how to do it? Use this [fiddle example](http://jsfiddle.net/igorescobar/6pco4om7/).\n\n## Contributing\n * **Bug Reporting**: Yes! You can contribute opening [issues](https://github.com/igorescobar/jQuery-Mask-Plugin/issues)!\n * **Documenting**: Do you think that something in our [docs](https://github.com/igorescobar/jQuery-Mask-Plugin/tree/gh-pages) should be better? Do you have a cool idea to increase the awesomeness? Summit your pull request with your idea!\n * **Bug Fixing**: No time to lose? Fix it and help others! Write some [tests](https://github.com/igorescobar/jQuery-Mask-Plugin/tree/master/test) to make sure that everything are working propertly.\n * **Improving**: Open an [issue](https://github.com/igorescobar/jQuery-Mask-Plugin/issues) and lets discuss it. Just to make sure that you're on the right track.\n * **Sharing**: Yes! Have we saved some of your time? Are you enjoying our mask plugin? Sharing is caring! Tweet it! Facebook it! Linkedin It(?!) :D\n * **Donating**: Hey, now that you don't need to worry about masks again... buy me a coffee, beer or a PlayStation 4 (Xbox One also accepted!) :o)\n\n### Unit Tests\nWe use [QUnit](http://qunitjs.com/) and [GruntJS](http://gruntjs.com/). To run our test suit is just run: ```grunt test``` in your console or you can open those ```test-for*.html``` files inside of our ```test/``` folder.\n\nIn case you're familiar with [Docker](https://www.docker.com/) here is how you can use it:\n```bash\ndocker build -t jquery-mask .\nCONTAINER_ID=$(docker run -d -v $PWD:/app/jquery-mask-plugin jquery-mask)\ndocker exec $CONTAINER_ID sh -c \"npm install\"\ndocker exec -it $CONTAINER_ID /bin/bash\ngrunt test\n```\n\n## Contributors\n * [Igor Lima](https://github.com/igorlima)\n * [Mark Simmons](https://github.com/Markipelago)\n * [Gabriel Schammah](https://github.com/gschammah)\n * [Marcelo Manzan](https://github.com/kawamanza)\n * [See the full list](https://github.com/igorescobar/jQuery-Mask-Plugin/graphs/contributors)\n","funding_links":["http://paypal.me/igorcescobar"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorescobar%2Fjquery-mask-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorescobar%2Fjquery-mask-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorescobar%2Fjquery-mask-plugin/lists"}