validator_
v1.3.0
Published
validation utility
Downloads
4
Readme
Validator_
A simple validation lib
import Validator from 'validator';
let validations = {
minLength: 6,
maxLength: 12,
required: true
};
let result = Validator.test("hello", validations); // true
let validationsBatch = {
key1: { email: true },
key2: { required: true }
};
let resultBatch = Validator.test({key1: "[email protected]", key2: "I'm here"}, validationsBatch); // true