1.0.9 • Published 6 years ago

js-validation-check v1.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

JavaScript validation made easy

You can use this package to reduce boiler plate code for your validation.

Build Status

Getting Started

Installing

npm i js-validation-check

###Example (JavaScript)

const validation = require('js-validation-check');

const config = {
  name: {
    max: 22,
    min: 3,
  }
}

const input = {
  name: 'sai umesh'
}

console.log(validation.validate(input, config));

###Example (TypeScript)

import { validate, IConfig } from 'js-validation-check';

const input = {
  email: 'someEmail@gmail.com',
  checkRegExp: 'ssInput' // your input should contain ss
}

const config: IConfig = {
  email: {
    min: 1,
    type: 'email'
  },
  checkRegExp: {
    min: 2,
    regExp: /ss/
  }
}

console.log(validate(input, config));
1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago