AutoForm is a Meteor package that adds UI components and helpers to easily create basic forms with automatic insert and update events, and automatic reactive validation.
MIT License
1.44k
stars
328
forks
source link
Upgraded to latest autoform and NPM version of Simpl-Schema no validation messages #1679
Not sure where the best place to put this is but I just spent a considerable amount of time trying to figure out how to get my validation to show up the "has-error" class and error text.
I learned that it was a s simple as adding { tracker: Tracker } to the new SimpleSchema() call like this:
For anyone migrating from aldeed:simple-schema to npm simpl-schema:
Make sure to add `{ tracker: Tracker }' when you create new Simple Schemas if you want reactive errors and such
If you use autoform fields in you schema add SimpleSchema.extendOptions(['autoform']); if you don't you will get an error message: Error: Invalid definition for description field: "autoform" is not a supported property
Not sure where the best place to put this is but I just spent a considerable amount of time trying to figure out how to get my validation to show up the "has-error" class and error text.
I learned that it was a s simple as adding
{ tracker: Tracker }
to thenew SimpleSchema()
call like this:For anyone migrating from
aldeed:simple-schema
to npmsimpl-schema
:autoform
fields in you schema addSimpleSchema.extendOptions(['autoform']);
if you don't you will get an error message:Error: Invalid definition for description field: "autoform" is not a supported property