Meteor-Community-Packages / meteor-autoform

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

Validation messages not showing - SimpleSchema 3.x #1722

Open mslobodan opened 2 years ago

mslobodan commented 2 years ago

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

jankapunkt commented 2 years ago

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

jankapunkt commented 2 years ago

@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.

mslobodan commented 2 years ago

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

jankapunkt commented 1 year ago

Related: