Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/northern/input-filter-js
A jQuery plugin to filter out keystrokes on an input field.
https://github.com/northern/input-filter-js
jquery jquery-plugin
Last synced: about 16 hours ago
JSON representation
A jQuery plugin to filter out keystrokes on an input field.
- Host: GitHub
- URL: https://github.com/northern/input-filter-js
- Owner: northern
- License: apache-2.0
- Created: 2014-03-17T05:37:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-11T03:21:43.000Z (almost 9 years ago)
- Last Synced: 2023-08-03T16:36:02.192Z (over 1 year ago)
- Topics: jquery, jquery-plugin
- Size: 6.84 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Input-Filter-JS
A simple jQuery plugin to filter keystrokes on an input field.
## Example
Input Filter allows you two filter on two distinct attributes; characters and length (or both).
To filter on characters, simply initialize the input field you wish to target and specify which characters are allowed:
$('input[name=creditcard-number]').inputFilter( {
'allowed': "0123456789"
} );Or maybe you want to set a maximum length:
$('input[name=creditcard-cvv]').inputFilter( {
'allowed': "0123456789",
'max-length': 3
} );That's pretty much it.