Closed Pierre-Mike closed 6 years ago
SimpleSchema.Links = new SimpleSchema({
_id : {
type: String,
regEx: SimpleSchema.RegEx.Id,
optional:true
},
title: {
type: String,
label: "Title",
max: 200,
optional: false,
},
url: {
type: String,
label: "Url",
regEx: SimpleSchema.RegEx.Url,
optional: false,
},
createdAt: {
type: Date,
optional: true,
autoValue : () => new Date(),
}
},{ tracker: Tracker });
Links = new Mongo.Collection('links');
Links.attachSchema(SimpleSchema.Links);
i'ts better sorry for that !!!
Thanks for the packages.
I've been looking for a while how to make error messages appear with autoform, autoform debug is enabled, SimpleSchema.debug too
I get all messages well in the console autoform-api.js:734 Error in insertLinks pre-submit validation Error: Title is required
and if I change page and then I return the error fields appear html
links.js
aldeed:autoform aldeed:collection2@3.0.0
"simpl-schema": "^1.5.0"