Skip to content

max_length validation is not wroking with Modelserializer #9489

Discussion options

You must be logged in to vote

@Anshulgoplus I can't seem to replicate this issue with the latest version of djangorestframework and without explicitly defining the name field in the serializer as suggested above, I got the following validation error with status code 400.

{
    "name": [
        "Ensure this field has no more than 255 characters."
    ]
}

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tomchristie
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #9485 on August 06, 2024 10:50.