Skip to content

ListField validation errors are inconsistent with ListSerializer #7279

@markopy

Description

@markopy

Validation errors when using ListSerializer are returned as a list with non-failing entries empty:

[ {}, {"foo": ["error"]}, {}, {"foo": ["another error"]} ] 

When using ListField the same information is unexpectedly returned as a dictionary:

{ "1": {"foo": ["error"]}, "3": {"foo": ["another error"]} } 

The current ListField error handling was implemented in #5655 along with DictField, which explains this behavior but I think it would be more obvious for ListField to behave like ListSerializer and return a list instead.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions