I'm using the jQuery inputmask plugin for masking a text field (https://github.com/RobinHerbots/Inputmask). I can't figure out the syntax for masking an unlimited number of alphanumeric characters. This seems like it should be simple I just can't seem to find the answer in in the documentation or another stackoverflow question. So far this works:
$('.inputmask_alphanumeric').inputmask({ mask: "[*]{100}", greedy: false });
{100} is a generous number for now, but I want this to be a generic class rule for any long text input in the future. I tried {*} and {+} but they didn't seem to work. Thanks.
1. Insert the minified version of the jQuery MaxLength plugin after you've loaded jQuery library. 2. Attach the plugin to the text field and specify the maximum number of characters using the native HTML maxlength attribute. ... 3. Create an element to hold the current character count.
limitText.js is a small (2kb minified) jQuery plugin that limits the number of characters allowed in your text fields and automatically creates counters to display how many characters remaining. Compatible with Bootstrap framework. Supports both input field and textarea. 1. Create a character counter container on the web page.
1. Import the jQuery jQuery Key Restrictions plugin into your document which has jQuery library loaded. 2. Restrict an input field to letters only. 3. Restrict an input field to numbers only. 4. Restrict an input field to Alpha Numeric only. This awesome jQuery plugin is developed by kenryanlabso.
MaxLength is a lightweight (less than 1kb) jQuery plugin to limit the number of characters allowed to type in an input field or textarea element. Prevents typing when reaching the limit. Character counter and countdown. Custom user feedback when reaching the limit. Works with the native HTML maxlength attribute. 1.
[]
optional()
group{}
range[*]{100}
== Optional char *
must be entered 100
times
You need *{0,}
to create a min:0
and max:infinite
mask
Or {1,}
to create a min:1
and max:infinite
and so on :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With