npm.io
0.0.2 • Published 8 years ago

schm-validators

Licence
MIT
Version
0.0.2
Deps
0
Size
2 kB
Vulns
0
Weekly
0

VALIDATORS

Collection of schm validators

Installation

npm install validators or yarn add validators

Usage
const schema = require('schm');
const { email } = require('schm-validators');

const testEmail = schema({
  user: String,
  email: {
    type: String,
    email: true,
  }
}, email());

testEmail.validate({
  user: 'testUser',
  email: 'testUser@example.com'
});