meteor-autoform
meteor-autoform copied to clipboard
Validation messages not showing - SimpleSchema 3.x
Problem
I have created a simple Meteor project and added a form. The problem is that validation errors are not showing after submitting.
We are using:
-
aldeed:autoform
, -
aldeed:collection2
, -
communitypackages:autoform-bootstrap4
and - npm package
simpl-schema
To Reproduce
- Clone simple repository https://github.com/mslobodan/autoform-validation-issue
- install dependencies with
meteor npm install
- start project with
meteor
command
Expected behavior
If form is not populated and after Submit button is clicked I should see validation error below input fields.
Versions
- Meteor version: 2.7.3
- Browser: Firefox, Chrome
Hi @mslobodan thank your for submitting an issue. I am checking out your linked repository right now and get back to you afterwards.
@mslobodan the problem is that SimpleSchema removed Meteor support with version 3 and therefore your { tracker: Tracker }
has no effect at all, which results in the messages not being shown reactively.
Downgrading to simple schema @1.13.1 solves the issue. However this is a problem now, because I am not sure how we can work this out.
@jankapunkt Thank you for investigating this and for your explanation! 😄
Related:
- https://github.com/Meteor-Community-Packages/organization/issues/69
- https://forums.meteor.com/t/simple-schema-3/59001