JD.
JD.

Reputation: 2487

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

I want to created an automatically validated method like the one here but using a schema already defined and attached to a collection.

To this end is there a way to extract a collections attached schema, something like:

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

?

Thanks!

Upvotes: 0

Views: 179

Answers (1)

JD.
JD.

Reputation: 2487

it's Books.simpleSchema() this returns the schema object attached to the given collection

Upvotes: 3

Related Questions