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

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy