Skip to content

example/checkbox.py validate is not working #161

Open
@g-paras

Description

@g-paras

According to the code, user must select at least one topping otherwise it should print 'You must choose at least one topping' then ask again but instead program prints a dictionary with toppings as key and empty list as value, which is wrong.

Activity

flavienbwk

flavienbwk commented on Jul 23, 2021

@flavienbwk

I can reproduce the issue.

kyzima-spb

kyzima-spb commented on Jul 31, 2021

@kyzima-spb

I can reproduce the issue.

prompt([
    {
        'type': 'checkbox',
        'name': 'invalid_value',
        'message': 'Any value invalid',
        'validate': lambda answer: False,
        'choices': [{'name': 'item 1'}, {'name': 'item 2'}, {'name': 'item 3'}]
    }
])

The example from the documentation doesn't work either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @kyzima-spb@flavienbwk@juandspy@g-paras

      Issue actions

        example/checkbox.py validate is not working · Issue #161 · CITGuru/PyInquirer