Meteor doesn't have a built in validation smart package yet. What validation libraries should I consider? What are other people using?
We decided to use simpleSchema with Collection2 and autoform for validation. It's a very sophisticated solution. We save a lot of time using this approach rather than trying to roll each form by hand.
Simply by defining a scheme with validation rules (validation rules are provided automatically for data type and isRequired settings) then creating a form with autoForm (a single line of code) and you get all this for free
meteor-simple-schema A simple, reactive schema validation smart package for Meteor. https://github.com/aldeed/meteor-simple-schema
meteor-collection2 A smart package for Meteor that extends Meteor.Collection to provide support for specifying a schema and then validating against that schema when inserting and updating. Also adds support for virtual fields. https://github.com/aldeed/meteor-collection2
meteor-autoform A smart package for Meteor that adds UI components and helpers to easily create basic forms with automatic insert and update events, and automatic reactive validation. https://github.com/aldeed/meteor-autoform
If you want to use meteorite, you can just search through the atmosphere packages to see what's popular. I'm currently using jqBootstrapValidation. In the past I have used validate.js, but right now I prefer to have something with bootstrap integration. I hear parsley.js is popular with the cool kids, though as of this writing there isn't a smart package for it - but that's easy enough to solve.
You already have Tracker
as part of Meteor, so I put a little tutorial and JSfiddle together on how to use it to implement a typical form validation scenario.
http://bit.ly/meteor-form-validation-video
http://bit.ly/meteor-form-validation-fiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With