Add explicit validations to the mongoose models rather than having the validation performed by json schemas. This is how django-popolo handles things.
This change would mean less magic going on with the validations, which are currently done in middleware. It would also make it easier to express things like "All memberships must assign values to either member, person, or person_id and to either organization, organization_id, post or post_id."
Add explicit validations to the mongoose models rather than having the validation performed by json schemas. This is how django-popolo handles things.
This change would mean less magic going on with the validations, which are currently done in middleware. It would also make it easier to express things like "All memberships must assign values to either
member
,person
, orperson_id
and to eitherorganization
,organization_id
,post
orpost_id
."