A simple JavaScript library for validating data
Install the library with npm install froncubator-validator
let validator = require('froncubator-validator-js');
validator.isInt(123); //=> true| Validator | Description |
|---|---|
| isEmail(value) | Check is value is email and return true or false. |
| isString(value, min, max) | Check is value is string and return true or false. You can also check the number of characters in the string with min or max but it is not obligatory. |
| isBool(value) | Check is value is boolean and return true or false. |
| isInt(value) | Check is value is integer and return true or false. |
| isArray(value) | Check is value is array and return true or false. |
Froncubator validator is freely distributable under the terms of the MIT license.