Skip to content

More specific error message for Any() #412

@Suor

Description

@Suor

Now it's:

from voluptuous import Any, Schema

schema = Schema(Any(str, None))
schema(10)
# MultipleInvalid: not a valid value

I would expect something like "expected str or none". I know I can pass msg to Any, but it would be nice to have better default for such a common case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions