CampbellSoftwareSolutions / mongoose-id-validator

Mongoose plug in to validate ObjectID references point to valid existing documents.
Other
47 stars 26 forks source link

Allow refCondtions to be a function #13

Closed arjanfrans closed 8 years ago

arjanfrans commented 8 years ago

I needed to set refConditions dynamically, so I made it possible for a refCondtion value to be a function that has the model instance as a context.

martin-css commented 8 years ago

Thanks for your comprehensive pull request with tests & documentation added as well as the code. Published on NPM as version 0.3.0.