Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in ExpressionValidator class #544

Open
carlosandujar opened this issue Jul 3, 2024 · 0 comments
Open

Bug in ExpressionValidator class #544

carlosandujar opened this issue Jul 3, 2024 · 0 comments

Comments

@carlosandujar
Copy link

carlosandujar commented Jul 3, 2024

  • 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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant