validator_

1.3.0 • Public • Published

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: "hello@world.com", key2: "I'm here"}, validationsBatch); // true

Package Sidebar

Install

npm i validator_

Weekly Downloads

1

Version

1.3.0

License

MIT

Last publish

Collaborators

  • stowns