-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Feat (checkbox): Support validate
config
#1319
Feat (checkbox): Support validate
config
#1319
Conversation
…e they were failing because of new validation logic
…sts since they were failing because of new validation logic" This reverts commit 3b4e0e7.
…ible, fixed unit tests
# Conflicts: # packages/checkbox/README.md # packages/checkbox/checkbox.test.mts # packages/checkbox/src/index.mts
Hey @Srenky, thanks for sending this PR! I'll have to disagree on the approach taken unfortunately. Adding Instead, I'd prefer adding a generic You can see an example of a generic |
Codecov ReportAll modified and coverable lines are covered by tests ✅
... and 1 file with indirect coverage changes 📢 Thoughts on this report? Let us know! |
@SBoudrias Totally agree with you on this one. I didn't even think about using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few comments, but overall this look solid! Thanks!
validate
config
Thanks a ton for the PR! Great addition :) |
Second part of #1257
Added two new optional properties to config:
minChoices
,maxChoices
With these properties, users can specify how many choices can be selected.
The validation logic has been expanded.
Possible topic for discussion
minChoices
andmaxChoices
equal and extend validation logic with one more condition and its own message