https://github.com/basemax/filterinputjs
Tiny and Powerful Library for limit an entry (text box,input) as number,string or more...
https://github.com/basemax/filterinputjs
form-validate form-validation form-validator input input-validation input-validator javascript javascript-lib javascript-libraries javascript-library js js-library js-libs purejs valid validate validation validation-library validations validator
Last synced: about 1 month ago
JSON representation
Tiny and Powerful Library for limit an entry (text box,input) as number,string or more...
- Host: GitHub
- URL: https://github.com/basemax/filterinputjs
- Owner: BaseMax
- License: gpl-3.0
- Created: 2018-06-27T10:06:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-13T19:43:55.000Z (over 3 years ago)
- Last Synced: 2025-02-04T07:15:37.941Z (4 months ago)
- Topics: form-validate, form-validation, form-validator, input, input-validation, input-validator, javascript, javascript-lib, javascript-libraries, javascript-library, js, js-library, js-libs, purejs, valid, validate, validation, validation-library, validations, validator
- Language: JavaScript
- Homepage:
- Size: 111 KB
- Stars: 39
- Watchers: 5
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Filter Input
## FilterInputJs
![]()
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:
```html
```
or download the [minified file](https://raw.githubusercontent.com/BaseMax/FilterInputJs/master/dist/index.min.js)
or use: https://cdn.jsdelivr.net/npm/filterinput/src/index.min.js
## Install
This package available in the [npmjs repository (filterinput)](https://www.npmjs.com/package/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 `` tag.
- [x] input
- [ ] textarea
- [ ] select## Arguments
| Argument Name | Goal |
| ---------------- | ------------------------------------ |
| data-filter | Set type of Filter for a 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
- [ ] allYou can discuss or send a request at [here](https://github.com/BaseMax/FilterInputJs/issues/4).
## Samples
To view the full details, run the example [.html file](https://github.com/BaseMax/FilterInputJs/blob/master/dist/index.html).
#### `data-filter`
```
Decimal :```
```
Integer :```
#### `data-filter-lang`
soon will be complete.
You can choose multiple languages.
Separate them with `,`.#### `onclick`
soon will be complete.
# Development
```bash
npm run dev
``````bash
npm run build # build the production files
```# License
FilterInput is licensed under the [GNU General Public License](LICENSE).