Skip to content

Add min/max count support for select elements#592

Merged
iruzevic merged 2 commits intorelease/8.14.4from
fix/588-enforce-mulitiselect-min-max
Mar 9, 2026
Merged

Add min/max count support for select elements#592
iruzevic merged 2 commits intorelease/8.14.4from
fix/588-enforce-mulitiselect-min-max

Conversation

@piqusy
Copy link
Contributor

@piqusy piqusy commented Mar 8, 2026

Description

Fix multiselect field min/max count not enforced on frontend

The selectMinCount and selectMaxCount attributes were saved in the editor but never passed to the frontend —

Choices.js had no way to know about the configured limits, allowing users to select unlimited items.

Changes:

  • Thread selectMinCount/selectMaxCount from PHP → data attributes → JS form state → Choices.js maxItemCount option
  • Backend validation on submit remains unchanged as a safety net

Linked documentation PR

Closes #588

@piqusy piqusy requested a review from iruzevic March 8, 2026 22:14
@piqusy piqusy self-assigned this Mar 8, 2026
@piqusy piqusy added the bugfix A report on a possible bug in the code label Mar 8, 2026
@piqusy piqusy changed the title fix(select): Add min/max count support for select elements Add min/max count support for select elements Mar 8, 2026
@iruzevic iruzevic linked an issue Mar 9, 2026 that may be closed by this pull request
@iruzevic iruzevic merged commit b551f5a into release/8.14.4 Mar 9, 2026
3 checks passed
@iruzevic iruzevic deleted the fix/588-enforce-mulitiselect-min-max branch March 9, 2026 06:02
iruzevic added a commit that referenced this pull request Mar 9, 2026
* fix(forms): add project settings to inline CSS variable output (#591)

* Add min/max count support for select elements (#592)

* fix(select): Add min/max count support for select elements

* chore: bump version to 8.14.4 and update changelog

---------

Co-authored-by: Ivan Ramljak <22823970+piqusy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix A report on a possible bug in the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] - Multiselect min/max fields are not working

2 participants