Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A jQuery Plugin to make masks on form fields and HTML elements.

License

NotificationsYou must be signed in to change notification settings

igorescobar/jQuery-Mask-Plugin

Repository files navigation

A jQuery Plugin to make masks on form fields and HTML elements.

Build StatusCode ClimatejsDelivr HitsCDNJS

Documentation, Demos & Usage Examples

https://igorescobar.github.io/jQuery-Mask-Plugin/

Features

  • Lightweight (~2kb minified, ~1kb gziped).
  • Built-in support for dynamically added elements.
  • Masks on any HTML element (no need to server-side mask anymore!)!
  • HTML notation support (data-mask, data-mask-recursive, data-mask-clearifnotmatch).
  • String/Numeric/Alpha/Mixed masks.
  • Reverse mask support for masks on numeric fields.
  • Sanitization.
  • Optional digits.
  • Recursive Digits.
  • Fallback Digits.
  • Advanced mask initialization.
  • Advanced Callbacks.
  • On-the-fly mask change.
  • Mask removal.
  • Full customization.
  • Compatibility with React/UMD/Zepto.js/Angular.JS.
  • HTML5 placeholder support.
  • Clear the field if it not matches support.

Want to buy me a beer? 😍

http://paypal.me/igorcescobar

Install it via Package Managers

Bower

bower install jquery-mask-plugin

NPM

npm i jquery-mask-plugin

Meteor

meteor add igorescobar:jquery-mask-plugin

Packagist/Composer

composer require igorescobar/jquery-mask-plugin

CDNs

CDNjs

https://cdnjs.com/libraries/jquery.mask

JSDelivr

http://www.jsdelivr.com/projects/jquery.mask

RubyGems

gem'jquery_mask_rails'# more details at http://bit.ly/jquery-mask-gem

Tutorials

English

Portuguese

Fun (or not) facts

Compatibility

jQuery Mask Plugin has been tested with jQuery 1.7+ on all major browsers:

  • Firefox 2+ (Win, Mac, Linux);
  • IE7+ (Win);
  • Chrome 6+ (Win, Mac, Linux, Android, iPhone);
  • Safari 3.2+ (Win, Mac, iPhone);
  • Opera 8+ (Win, Mac, Linux, Android, iPhone).
  • Android Default Browser v4+

Typescript support

Definition can be foundhere.

To install, open terminal and navigate to your working directory.

Typescript 1.x users

  • Installtypings by runningnpm install typings --global.
  • Then install the definition by runningtypings install dt~jquery-mask-plugin --global --save.

Typescript 2.x users

  • Use npmnpm install --save-dev @types/jquery-mask-plugin.

For configuration options and troubleshooting refer to these repositories:

Problems or Questions?

Before opening a newissue take a look on those frequently asked questions:

Bugs?

Did you read ourdocs? Yes? Cool! So now... make sure that you have afunctionaljsfiddle exemplifying your problem and open anissue for us. Don't know how to do it? Use thisfiddle example.

Contributing

  • Bug Reporting: Yes! You can contribute openingissues!
  • Documenting: Do you think that something in ourdocs should be better? Do you have a cool idea to increase the awesomeness? Summit your pull request with your idea!
  • Bug Fixing: No time to lose? Fix it and help others! Write sometests to make sure that everything are working propertly.
  • Improving: Open anissue and lets discuss it. Just to make sure that you're on the right track.
  • 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
  • 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)

Unit Tests

We useQUnit andGruntJS. To run our test suit is just run:grunt test in your console or you can open thosetest-for*.html files inside of ourtest/ folder.

In case you're familiar withDocker here is how you can use it:

docker build -t jquery-mask.CONTAINER_ID=$(docker run -d -v$PWD:/app/jquery-mask-plugin jquery-mask)dockerexec$CONTAINER_ID sh -c"npm install"dockerexec -it$CONTAINER_ID /bin/bashgrunttest

Contributors

About

A jQuery Plugin to make masks on form fields and HTML elements.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors44


[8]ページ先頭

©2009-2025 Movatter.jp