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

[5.x] Allow options without labels in the Button Group & Select fieldtypes #10336

Merged
merged 12 commits into from
Aug 9, 2024

Conversation

duncanmcclean
Copy link
Member

This pull request fixes an issue where it wasn't possible to add options without labels in the Button Group & Select fieldtypes, even though the UI indicated it should have been possible.

This worked fine previously. However, in #9834, we changed how we handle validating Array fields so it forces both keys and values to be set.

This change was an oversight, since there are cases, like this one, where you want the value to be optional

This PR removes the "force values" validation from the Array fieldtype, removes the duplicated "force keys" validation from the Button Group & Select option fields (since the Array field does that for us now) and adds tests to ensure options can be configured without labels.

Fixes #10323.

@jasonvarga jasonvarga merged commit 416e970 into 5.x Aug 9, 2024
17 checks passed
@jasonvarga jasonvarga deleted the fix/select-fieldtype-validation branch August 9, 2024 19:48
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

Successfully merging this pull request may close these issues.

Optional labels on Button Group are not optional?
2 participants