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