meteor-autoform icon indicating copy to clipboard operation
meteor-autoform copied to clipboard

Validation messages not showing - SimpleSchema 3.x

Open mslobodan opened this issue 2 years ago • 4 comments

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:

  1. aldeed:autoform,
  2. aldeed:collection2,
  3. communitypackages:autoform-bootstrap4 and
  4. npm package simpl-schema

To Reproduce

  1. Clone simple repository https://github.com/mslobodan/autoform-validation-issue
  2. install dependencies with meteor npm install
  3. 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

mslobodan avatar Oct 21 '22 17:10 mslobodan

Hi @mslobodan thank your for submitting an issue. I am checking out your linked repository right now and get back to you afterwards.

jankapunkt avatar Oct 22 '22 14:10 jankapunkt

@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 avatar Oct 22 '22 15:10 jankapunkt

@jankapunkt Thank you for investigating this and for your explanation! 😄

mslobodan avatar Oct 23 '22 09:10 mslobodan

Related:

  • https://github.com/Meteor-Community-Packages/organization/issues/69
  • https://forums.meteor.com/t/simple-schema-3/59001

jankapunkt avatar Jan 13 '23 13:01 jankapunkt