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

Check value of choice elements against options #3829

Merged
merged 4 commits into from
Oct 7, 2024
Merged

Check value of choice elements against options #3829

merged 4 commits into from
Oct 7, 2024

Conversation

falkoschindler
Copy link
Contributor

@falkoschindler falkoschindler commented Oct 4, 2024

This PR raises a more readable exception when initializing a choice element with an invalid value, as discussed in #3809:

ui.select(['Apple', 'Banana'], value='Cherry')
  • fix tests
  • add test for new behavior

@falkoschindler falkoschindler added the enhancement New feature or request label Oct 4, 2024
@falkoschindler falkoschindler added this to the 2.4 milestone Oct 4, 2024
@falkoschindler falkoschindler linked an issue Oct 4, 2024 that may be closed by this pull request
@rodja
Copy link
Member

rodja commented Oct 5, 2024

We should also add a user test to verify the behaviour.

@falkoschindler falkoschindler requested a review from rodja October 7, 2024 09:37
@rodja rodja merged commit 838421b into main Oct 7, 2024
8 checks passed
@rodja rodja deleted the invalid-value branch October 7, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validation Element Error
2 participants