https://github.com/antoniopresto/meteor-simple-schema
https://github.com/antoniopresto/meteor-simple-schema
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/antoniopresto/meteor-simple-schema
- Owner: antoniopresto
- License: mit
- Created: 2016-10-02T23:26:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-02T23:37:41.000Z (over 8 years ago)
- Last Synced: 2025-01-31T01:53:55.489Z (4 months ago)
- Language: JavaScript
- Size: 1.07 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://travis-ci.org/aldeed/meteor-simple-schema)
SimpleSchema
=========================*aldeed:simple-schema*
A Meteor package that wraps the [simpl-schema](https://github.com/aldeed/node-simple-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
```js
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
```## Reactivity
```js
if (Meteor.isClient) {
Meteor.startup(() => {
let context = BookSchema.namedContext("myContext");
Tracker.autorun(() => {
if (!context.isValid()) {
console.log(context.validationErrors());
}
});
});
}
```## License
MIT