Skip to content

Validators need to return bool #349

Closed
@jpoikela

Description

@jpoikela

Hi!
I like your library!

I tried to take a short-cut in my state machine, validator returned a list (empty list would mean False) and the error message was not related to the actual problem.

I wonder if it would make sense to emphasize (in example, maybe) that validators need to return bool value.
Or make it checked somehow? if a guard gets something else than a bool, it would log a warning?
Or then, it's also possible to coerce to bool... not sure which is best here.

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