Skip to content

Support kwargs for validators #8

Open
@theteladras

Description

@theteladras

The idea would be to have the validator functions, which accept an dict options argument, to also support a variant of the methods that can accept options via kwargs.

For example the is_email validator, accepts as a second argument an options dict, like in this case:

is_email("[email protected]", { "allow_display_name": True })

The idea would be to have this method also accept kwargs with the same option properties with a lower precedence over the dict argument.

So the execution of the validator would end up something like this:

is_email("[email protected]", allow_display_name=True)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions