fbl773 / point-b_ank

Forked from PCubed by the marvelous 371 team 4
Apache License 2.0
0 stars 0 forks source link

Mongo input validation only runs on creation not update #26

Open fbl773 opened 2 months ago

fbl773 commented 2 months ago

~issue - Mongo Validation insufficient

Description

I observed during the implementation of #23 that the input validation (i.e. checking an enum of acceptable values) is only run when an entity is first added to a collection. If you want to use a bogus value in an update that is totally OK... well for us it isn't OK but mongoose has no issue with it.

We need to A) research full mongoose driven validation or B) implement our own validation if nothing is found... I hope we find something.