Open AndrewOwenMartin opened 5 years ago
I came here with the same question. It seems that the answer is in the source code already: https://github.com/CITGuru/PyInquirer/blob/10d53723b36ebc7bba311457ec4afd9747a5c777/PyInquirer/prompts/checkbox.py#L225
Yea, the checkbox doesn't have validator yet. PR is accepted if you figured it out
LOL, I was going nuts thinking that there was something wrong with my code. Good to know that the validator is not yet implemented.
I was looking for the same thing!
I was looking for the same thing! Help...
This seems like an important feature that should be implemented. I too came here with the same problem. PyInquirer is easy to use and does so much well, but I'm not sure how to get around this one.
Great, was about to type in the same issue when I realized that the feature doesn't exist yet
I just encountered this problem. It would indeed be a nice feature to have.
For those who need this feature, there is a project called questionary based on this project (but the code has been refactored and tidied up a lot) and seems a bit more up-to-date - the API is very similar.
I've submitted a pull request to the newer repo (https://github.com/tmbo/questionary/pull/48) which adds validation for the checkbox.
It seems to be impossible to raise a validation error on type "checkbox".
Here is the output I get when I run the "checkbox.py" example, and try to trigger "'You must choose at least one topping." error message
Going into more detail, I tried to make a set of questions with all the ways of making a validation error, all checkboxes should fail in all cases, but only the final "input" case shows an error.
Returns