flask-mongorest
flask-mongorest copied to clipboard
Validate related_resource forms
class FooResource(Resource):
form = FooForm
document = FooDocument
class BarResource(Resource):
document = BarDocument
related_resources = {
'foos': FooResource
}
In the above scenario, submitting a BarDocument with a list of Foo's should validate using the FooResource.form before saving.
We moved away from forms and are using schemas instead. That being said, it would be ideal if a similar logic applied to Foo#schema
.