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

Add max_length and min_length options to ListSerializer #8165

Merged
merged 1 commit into from
Sep 14, 2021

Conversation

TheBlusky
Copy link
Contributor

Description

I needed to restrict the amount of elements within a ListSerializer (to prevent big and long requests).

I initially implemented this in a "per field" validation but I thought it could be implemented like the already existing allow_empty option.

@tomchristie
Copy link
Member

For almost anything in REST framework at the moment I'd simply close off new feature requests.
But... this seems obvious enough, neatly implemented, includes docs + tests, and... I think it's probably a nice little addition, yup.

Fab, thank you!

@tomchristie tomchristie merged commit f0a5b95 into encode:master Sep 14, 2021
sigvef pushed a commit to sigvef/django-rest-framework that referenced this pull request Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants