Meteor-validate: An Easy Way to Validate Arguments

Inspired by Meteor.check, validator and koa-validator, this package helps you validate the arguments of methods in a chainable, readable and easy way.

It’s actually an extendable module with a very small set of core functions. You can easily add validations to it. Even if you don’t want to extend it, the built-in validations and adapted validations from validator can help you replace Meteor.check right now.

a taste:

validate(arg).optional().isClass(Date).gt(new Date('2015-01-01')).lt(new Date('2015-12-31'));

For more, see:
Atmosphere
Github

5 Likes

Looks good, will give it a try.