1.3.0 • Published 8 years ago

validator_ v1.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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