-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected validation on save #110
Comments
If you trying doing |
It still fail with |
I ended up with using |
Sorry i have to downgrade the mongoose unique validator package due to this issue ... mongoose-unique-validator/mongoose-unique-validator#110
mongoose-unique-validator has a bug in it so that when you have multiple users it detects the reference to _id in another schema. Then it decides that _id is no longer unique and will not let any user post a new Document. The fix at the moment is to re-roll mongoose and mongoose-unique-validator to v^5.11.13 and v^2.0.3 respectively. There is a current GitHub issue posted here. Answered By – James Beswick |
I'm using the above code to do update with validation. Without this plugin it works fine. But if I add this plugin, it failed with errors about all the unque fields, including
_id
.Is this expected? Any workaround? Thanks
The text was updated successfully, but these errors were encountered: