Skip to content

validators.OneOf w/ testValueList=True not functional #22

Description

@bismark

Changes in 1.2.5 appear to have made the testValueList non-functional when a validator.OneOf field is in a Schema:

class foo(Schema):
    bar = validators.OneOf((1,2,3), testValueList=True)

foo.to_python({'bar':(1,2,3)})

Result: Invalid: bar: Please provide only one value

If I add accept_iterator=True to validators.OneOf, the result is {'bar': (1, 2, 3)}

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