Meteor.publish('Todos.inList', function(listId) {
// We need to check the `listId` is the type we expect
new SimpleSchema({
listId: {type: String}
}).validate({ listId });
// ...
});
.validate() needs an object but .validate({ listId }); produces an error for me:
SyntaxError: Unexpected token }
pointing to the closing curly bracket:
}).validate({oneToManyContent});
^
Using Meteor 1.2.1 and aldeed:simple-schema@1.5.3
Am I doing something wrong here? oneToManyContent is a string, actually the content of a textarea. I’m using it in a Meteor.methods call on the server end (actually in my backend app as I have both frontend and backend running as two separate apps).
If not, how can I report the error in the Meteor guide back to the guys who wrote it?
The Guide has it’s own repo on github, so you could file an issue or PR there https://github.com/meteor/guide. It’s easier for MDG to accept PRs into the guide.
ecmascript is not in your list of packages, so it’s not being run against your code. It’s appearing in your versions file as a result of it being used in a package.
You need to meteor add ecmascript to your project.