We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06f416b commit 54218caCopy full SHA for 54218ca
README.md
@@ -24,7 +24,7 @@ const schema = new mongoose.Schema({
24
25
const model = mongoose.model('person', schema);
26
27
-const object = new model({ name: 'a' });
+const object = new model({});
28
object.save(function (err, doc) {
29
if (err) {
30
const error = mongooseErrorHandler(err);
@@ -34,8 +34,8 @@ object.save(function (err, doc) {
34
* message: "name" is required
35
* name: 'MongooseValidatorError',
36
* path: 'name',
37
- * kind: 'unique',
38
- * value: "a"
+ * kind: 'required',
+ * value: undefined
39
*/
40
}
41
});
0 commit comments