I've been looking around to find some way of setting a rule in my MongoDB database so that I can store rgb values and ensure that they stay between 0 and 255, is there a way of doing this in Mongoose e.g. the schema model or will I need to do this at application level?
Asked
Active
Viewed 21 times
0
-
Why do you need this? – ŞükSefHam May 11 '18 at 18:38
-
Okay, so I'm storing rgb values, which are values between 0 - 255, and therefore I'd like to ensure all data is between this range – unkwndev May 11 '18 at 20:38