Skip to content

List of lists does not pass validation #897

@hazardsy

Description

@hazardsy

I am trying to use a list of list of floats in my code, but I can't seem to pass the marshmallow validation, no matter what schema I try.
The following code looks to me like it should work, but somehow doesn't, is it an issue on my part ?

class FAQPostInput(Schema):
    location = fields.List(fields.List(fields.Float))

    class Meta:
        strict = True

Input :

data = {
    "location": [
        [0.2, 0.3, 0.4]
    ]
}

Thanks for your answers !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions