0.0.2 • Published 6 years ago

schm-validators v0.0.2

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

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'
});