https://github.com/femto-apps/lib-verify
A simple verification library for validating the sanity of variable contents.
https://github.com/femto-apps/lib-verify
input-validation node-js nodejs
Last synced: 11 months ago
JSON representation
A simple verification library for validating the sanity of variable contents.
- Host: GitHub
- URL: https://github.com/femto-apps/lib-verify
- Owner: femto-apps
- License: mit
- Created: 2019-04-19T21:49:49.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-17T19:04:52.000Z (over 5 years ago)
- Last Synced: 2025-01-15T19:54:32.519Z (about 1 year ago)
- Topics: input-validation, node-js, nodejs
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## lib-verify
> A simple verification library for validating the sanity of variable contents.
### Usage
```JavaScript
const { verify } = require('../index')
let result = verify('Name', 'Alexander', [
verify.string.maxLength(6),
verify.string.minLength(3)
])
console.log(result) // [ "Name field is too long: 'Alexander', maximum length is 6 but found length 9" ]
```