Problem with "Object Type" of "SimpleSchema" in "Publications"?


#1

I use SimpleSchema to validate args in Publications.
But I have the problem with Object Type:

// Server
Meteor.publish('test', function(selector) {
  // We need to check the `listId` is the type we expect
  new SimpleSchema({
    selector: {type: Object}
  }).validate({ selector });

  // ...
});

// Client
Template.myTpl.onCreated(function(){
           this.autorun(() => {
                this.subscribe('test', {_id: {$in: ['001', '002']}});
            }
});

It don’t work, but when I tried to change to StringType it is work fine.
Please help me.