You can use http://docs.meteor.com/#deny (you can use allow, but it may be easier to place the verification material in a separate rejection), since negation will be override if it should not be inserted:
It works the same as the backup method on the server before inserting it.
With your message collection
Js server
message.deny({ insert: function (userId, doc) { return (!doc.description || !doc.location.lat || !doc.location.lng || !doc.mysex || !doc.yoursex); }, update: function (userId, docs, fields, modifier) { return (!doc.description || !doc.location.lat || !doc.location.lng || !doc.mysex || !doc.yoursex); } );
Note Returning false from deny means giving up the ban. To reject an update, you must return true.
source share