FilterInputJs
Tiny and Powerful Library for limit an entry (text box,input) as number,string or more...
Install / Use
/learn @BaseMax/FilterInputJsREADME
Filter Input
FilterInputJs
<p align="center"> <img alt="FilterInput" src="https://raw.githubusercontent.com/BaseMax/FilterInputJs/master/image.jpg"> </p>Tiny and Powerful Library for limit an entry (text box,input) as number,string or more...
Getting started
Add the following line to your .html file:
<script src="https://cdn.jsdelivr.net/gh/BaseMax/FilterInputJs@master/dist/index.min.js"></script>
or download the minified file
or use: https://cdn.jsdelivr.net/npm/filterinput/src/index.min.js
Install
This package available in the npmjs repository (filterinput), so you can easily install it with:
npm i filterinput
Features
- Fast
- Compact
- No dependencies
- Easy using Filters
Supported Tags
currently , only work on <input> tag.
- [x] input
- [ ] textarea
- [ ] select
Arguments
| Argument Name | Goal | | ---------------- | ------------------------------------ | | data-filter | Set type of Filter for a <input> tag | | data-filter-lang | Restrict allowed languages (soon) |
Data Filters
- [x] Decimal
- [x] !Decimal (a decimal , not empty)
- [x] Integer
- [x] !Integer (a integer , not empty)
- [ ] String (any character , no number)
- [ ] !String (a string , not empty)
- [ ] Alphabet (english,farsi:persian,arabic,china,...)
- [ ] !Alphabet (english,farsi:persian,arabic,china,...) not empty!
- [ ] Alphabet0 (may be have number characters)
- [ ] !Alphabet0 (may be have number characters) not empty!
- [ ] Any (any char or empty)
- [ ] !Any (any char , not empty)
Data Filter Languages
- [ ] english
- [ ] persian
- [ ] arabic
- [ ] all
You can discuss or send a request at here.
Samples
To view the full details, run the example .html file.
data-filter
Decimal :
<input data-filter="decimal" value="5.64">
Integer :
<input data-filter="integer" value="91">
data-filter-lang
soon will be complete.
You can choose multiple languages.
Separate them with ,.
onclick
soon will be complete.
Development
npm run dev
npm run build # build the production files
License
FilterInput is licensed under the GNU General Public License.
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
