mongoose-beautiful-unique-validation
Advanced tools
Changelog
v7.1.1
undefined
in nested schema.Changelog
v7.1.0
Changelog
v7.0.0
Duplicate value
to unique
to better fit Mongoose’s conventions.Changelog
v6.0.0
#findOneAndUpdate
now provides failing paths info.Model.update()
as advertised.Changelog
v5.1.1
Changelog
v5.1.0
#findOneAndUpdate
(but does not provide failing paths info).Changelog
v5.0.1
Changelog
v5.0.0
Beautifies the errors using an error middleware instead of overriding
the #save()
method. Only supports Mongoose 4.5.0 and onwards.
Because #save()
is not overriden anymore, the beautifyUnique
option
is now ignored. To remove the beautifying behavior, remove the plugin.
#save()
(including Model.create()
).Changelog
v4.0.0
Beautifies any kind of Mongoose field instead of passing
along the original error when working with ObjectId
s, Buffer
s
and Date
s.
The trySave()
method, deprecated in v3.0.0, is removed.
Changelog
v3.0.2