如何使用 Meteors aldeed:simpleschema 和 mdg:validated 方法获取集合附加模式

How to get a collections attached schema with Meteors aldeed:simpleschema and mdg:validated-method

我想创建一个类似 here 的自动验证方法,但使用已经定义并附加到集合的模式。

为此,有没有一种方法可以提取集合附加架构,例如:

  validate: Books.getSchema().validator(),

?

谢谢!

这是Books.simpleSchema()这个returns附加到给定集合的架构对象