Context
This follow-up task was identified during the review of PR #78.
Source PR: #78
PR Title: fix(checkbox): send array of values for multiple same-name checkboxes
Suggested by: @claude[bot]
Comment type: PR comment
Task Description
Consider adding an opt-in "always-array" mode for checkbox serialization. Currently, the type of a checkbox field depends on how many checkboxes share that name in the DOM:
- 1 checkbox →
true/false (boolean)
- 2+ checkboxes →
string[] (array of checked values)
If a form evolves from one checkbox to two (adding an option), the backend type silently changes. An opt-in attribute (e.g., lvt-checkbox:array) could let developers explicitly request array serialization for single checkboxes, giving backends a consistent type contract.
Original Comment
The single vs. multi-group branching means the type of a field on the server depends on how many checkboxes share that name in the DOM — not on the data itself. If a form evolves from one checkbox to two (adding an option), the backend type silently changes. Consider documenting whether a "always-array" variant is planned for consistency.
This issue was automatically created by prmonitor from PR review comments.
Context
This follow-up task was identified during the review of PR #78.
Source PR: #78
PR Title: fix(checkbox): send array of values for multiple same-name checkboxes
Suggested by: @claude[bot]
Comment type: PR comment
Task Description
Consider adding an opt-in "always-array" mode for checkbox serialization. Currently, the type of a checkbox field depends on how many checkboxes share that name in the DOM:
true/false(boolean)string[](array of checked values)If a form evolves from one checkbox to two (adding an option), the backend type silently changes. An opt-in attribute (e.g.,
lvt-checkbox:array) could let developers explicitly request array serialization for single checkboxes, giving backends a consistent type contract.Original Comment
This issue was automatically created by prmonitor from PR review comments.