Skip to content

presence validation fails for boolean false values #49

@sadesyllas

Description

@sadesyllas

Evaluating:

Vex.validate(%{"a" => false}, [{"a", [presence: true]}])

returns:

{:error, [{:error, "a", :presence, "must be present"}]}

If this is normal how can I validate that the key a exists in the map regardless of its value?

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