questions
questions copied to clipboard
Bug in ExpressionValidator class
- Questions version: 0.8.0 and current
- Python version: 3.9
- Operating System: Windows 10
Description
The following validator does not work as expected:
RadioGroupQuestion(title="Do you agree?", choices=["Yes", "No"], required=True, validators = [ ExpressionValidator(expression="{consent} == 'Yes'") ])
A workaround is to explicitly set kind="expression",
in the ExpressionValidator
constructor.
This is due to an error in class ExpressionValidator(Validator)
that contains kind: str = "regex"
which should be kind: str = "expression"