Skip to content

Add notes for min_values requirement for required components in label components#8177

Open
The-LukeZ wants to merge 8 commits intodiscord:mainfrom
The-LukeZ:main
Open

Add notes for min_values requirement for required components in label components#8177
The-LukeZ wants to merge 8 commits intodiscord:mainfrom
The-LukeZ:main

Conversation

@The-LukeZ
Copy link

Summary

Adds clarification for the min_values constraint when using select menus or other components with a min_values field inside label components with required: true.

Changes

Added a note to all components stating:

* min_values must be either omitted or at least 1 if required is omitted or true.

Reordered the \* note order to ensure it stays consistent.

Used the phrasing requested by @anthonydiscord in my last PR (#8105)


The API rejects modals containing required select menus with min_values: 0, but this constraint is not documented (well). This creates confusion for developers who encounter validation errors when trying to use this combination.

Setting min_values: 0 with required: true creates a logical conflict:

  • required: true means the user must interact with the component
  • min_values: 0 means the user can select nothing

This note helps developers understand the constraint and avoid this common pitfall.

I experienced this because users can build their own forms and the docs currently state "0 - 25"


Please let me know if any further changes should be made.

As said before, I already made a PR (#8105) before but then couldn't continue working on it. I now needed to redo all changes because of the docs-rework.

@The-LukeZ The-LukeZ requested a review from a team as a code owner February 27, 2026 12:25
@The-LukeZ The-LukeZ requested review from markmandel and removed request for a team February 27, 2026 12:25
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.

1 participant