/jquery-input-blocker

Blocks input depending on provided options

Primary LanguageJavaScriptGNU General Public License v2.0GPL-2.0

Travis status

jQuery Input Blocker

Lets through only allowed characters for <input> elements. Also works with pasting!

Requires jQuery 1.9. Run with tests: npm run Should work on IE 9.

Getting Started

Download the production version or the development version.

In your web page:

<script src="jquery.js"></script>
<script src="dist/input-blocker.min.js"></script>
<script>
jQuery(function($) {
  $('selector').inputBlocker({
    canPaste: true,
    allowedRe: /\d/,
    maxlength: 10,
    trimOnPaste: false
  }); // "initializes input blocker with provided options"
});
</script>

Documentation

(Coming soon)

Examples

(Coming soon)

Release History

V 1.00 released 15.08.2014.