-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Empty show more show less
When I look at https://mongodb.github.io/node-mongodb-native/2.2/api/Db.html#createCollectiondo not see documentation for the validator key. If I create a validator key and assign it a value like described in https://docs.mongodb.com/v3.2/reference/method/db.createCollection/#db.createCollection , it works. But that documentation is for the mongodb shell.
Also, the only way I could figure out that I had to pass validator to Db.createCollection() instead of being able to pass it to Db.collection() was by [searching the repo for `validator`](https://github.com/mongodb/node-mongodb-native/search?utf8=%E2%9C%93&q=validator) and seeing that [a test uses this feature](https://github.com/mongodb/node-mongodb-native/blob/393f6b0e1b18bb6c0181fd0678d1efa3dae5568c/test/functional/document_validation_tests.js)