quart-schema icon indicating copy to clipboard operation
quart-schema copied to clipboard

Fix form multiselect request validation

Open PierrickBrun opened this issue 2 years ago • 1 comments

When using a FORM Datasource, if a multiselect field is present, quart-schema will fail to validate the data.

This is because MultiDict.to_dict() returns only the first occurrence of each key by default.

By using flat=True this PR fixes this.

ref: https://stackoverflow.com/questions/51992901/capture-values-from-multiple-select-form-and-post-via-flask

https://werkzeug.palletsprojects.com/en/3.0.x/datastructures/#werkzeug.datastructures.MultiDict.to_dict

PierrickBrun avatar Dec 08 '23 14:12 PierrickBrun

Hi @pgjones , any opinion on this PR ? thanks

PierrickBrun avatar Jan 31 '24 16:01 PierrickBrun

Thanks

pgjones avatar May 15 '24 08:05 pgjones