Skip to content

Commit 54218ca

Browse files
committed
Update README.md
1 parent 06f416b commit 54218ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const schema = new mongoose.Schema({
2424

2525
const model = mongoose.model('person', schema);
2626

27-
const object = new model({ name: 'a' });
27+
const object = new model({});
2828
object.save(function (err, doc) {
2929
if (err) {
3030
const error = mongooseErrorHandler(err);
@@ -34,8 +34,8 @@ object.save(function (err, doc) {
3434
* message: "name" is required
3535
* name: 'MongooseValidatorError',
3636
* path: 'name',
37-
* kind: 'unique',
38-
* value: "a"
37+
* kind: 'required',
38+
* value: undefined
3939
*/
4040
}
4141
});

0 commit comments

Comments
 (0)