https://github.com/joseluisq/input-verifier
Some useful functions to check common data input.
https://github.com/joseluisq/input-verifier
data input utils validation
Last synced: 11 months ago
JSON representation
Some useful functions to check common data input.
- Host: GitHub
- URL: https://github.com/joseluisq/input-verifier
- Owner: joseluisq
- Created: 2017-02-10T11:12:45.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-06T09:18:14.000Z (about 9 years ago)
- Last Synced: 2025-07-07T21:25:45.837Z (12 months ago)
- Topics: data, input, utils, validation
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# input-verifier [](https://travis-ci.org/joseluisq/input-verifier) [](https://coveralls.io/github/joseluisq/input-verifier?branch=master) [](http://standardjs.com/)
> Some useful functions to validate common data input.
## Prerequisites
[NodeJS](https://nodejs.org) v4.0 or greater.
## Install
```sh
npm install input-verifier --save-dev
```
## Usage
```js
const verifier = require('input-verifier')
console.log(verifier.empty(' '))
// true
console.log(verifier.url('https://company.com'))
// true
console.log(verifier.email('info@company.com'))
// true
```
## API
All verification functions return a boolean value.
#### empty(x)
#### email(x)
#### url(x)
#### number(x)
#### digits(x)
#### decimal(x)
#### negative(x)
#### alphanumeric(x)
#### alphabetic(x)
#### major(x1, x2)
#### minor(x1, x2)
#### max(x, limit)
#### min(x, limit)
#### equalTo(x1, x2)
#### maxlength(x, len)
#### minlength(x, len)
## License
MIT license
© 2017 [José Luis Quintana](http://quintana.io)