Open AdamGerthel opened 6 years ago
Mongoose allow functions that return true or false as value for the required key:
true
false
required
thisIsAField: { type: String, required: function(value) { return whatever ? true : false } },
However, express-mongoose-docs lists this as a required field. I propose that field requirements that return a function are listed as "conditional" instead of "true".
Mongoose allow functions that return
true
orfalse
as value for therequired
key:However, express-mongoose-docs lists this as a required field. I propose that field requirements that return a function are listed as "conditional" instead of "true".