This plugin filters keyboard input by specified regular expression.
Source code inspired by Ext.JS (Ext.form.TextField, Ext.EventManager), but was modified to provide more accurate logic.
Procedural style:
$('#ggg').keyfilter(/[\dA-F]/); Also you can pass test function instead of regexp. Its arguments:
* this - HTML DOM Element (event target).
* c - String that contains incoming character.
$('#ggg').keyfilter(function(c) { return c != 'a'; });
CSS class attribute style:
Available classes:
* mask-pint: /[\d]/
* mask-int: /[\d\-]/
* mask-pnum: /[\d\.]/
* mask-num: /[\d\-\.]/
* mask-hex: /[0-9a-f]/i
* mask-email: /[a-z0-9_\.\-@]/i
* mask-alpha: /[a-z_]/i
* mask-alphanum: /[a-z0-9_]/i
Commercial Use
Modify
Distribute
Place Warranty
Use Patent Claims
Sub-License
Hold Liable
Distribute Original
Disclose Source
Include Copyright
State Changes
Include License
Include Install Instructions
These details are provided for information only. No information here is legal advice and should not be used as such.
There are no reported vulnerabilities
30 Day SummarySep 3 2024 — Oct 3 2024
|
12 Month SummaryOct 3 2023 — Oct 3 2024
|