Is it possible to enforce a field and have mongoDB always have a positive value for an integer field? It would be ideal if increment wouldn't make a number negative.
You can't restrict the data input/output on MongoDB, You need to do this in your program/code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With