Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-value filters should run validate() on each value #10529

Closed
jeremystretch opened this issue Sep 30, 2022 · 0 comments
Closed

Multi-value filters should run validate() on each value #10529

jeremystretch opened this issue Sep 30, 2022 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user

Comments

@jeremystretch
Copy link
Member

Proposed Changes

We use multivalue_field_factory() to generate filters that accept multiple values, to support querying for e.g. ?status=a&status=b (applying an OR logic). However, these filters are not properly validating the passed values. The class returned by multivalue_field_factory() should have its run_validators() and validate() methods overriden so that they execute on each value in the list.

Justification

This problem was originally uncovered by @arthanson while working on #10348. I've broken it into a separate issue for explicit tracking of the change, as it affects all multi-value filters.

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user labels Sep 30, 2022
@jeremystretch jeremystretch self-assigned this Sep 30, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user
Projects
None yet
Development

No branches or pull requests

1 participant