aldeed:simple-schema

v2.0.0-rc.1Published 8 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

Build Status

SimpleSchema

aldeed:simple-schema

A Meteor package that wraps the simpl-schema NPM package and makes a few adjustments for better Meteor support.

Installation

In your Meteor app directory, enter:

$ meteor add aldeed:simple-schema

Usage

1import { SimpleSchema } from 'meteor/aldeed:simple-schema';

Reactivity

1if (Meteor.isClient) {
2  Meteor.startup(() => {
3    let context = BookSchema.namedContext("myContext");
4    Tracker.autorun(() => {
5      if (!context.isValid()) {
6        console.log(context.validationErrors());
7      }
8    });
9  });
10}

License

MIT