Module twilight_validate::component
source · [−]Expand description
Constants, error types, and functions for validating Component
s.
Structs
A provided Component
is invalid.
Enums
Type of ComponentValidationError
that occurred.
Constants
Maximum Component
label length in codepoints.
Maximum number of root Component
s in a message.
Maximum length of a Component
custom ID in codepoints.
Maximum number of SelectMenuOption
s that can be chosen in a
SelectMenu
.
Minimum number of SelectMenuOption
s that can be chosen in a
SelectMenu
.
Maximum number of SelectMenuOption
s that must be chosen in a
SelectMenu
.
Maximum number of SelectMenuOption
s in a SelectMenu
.
Maximum length of a SelectMenuOption::description
in codepoints.
Maximum length of a SelectMenuOption::label
in codepoints.
Maximum length of a SelectMenuOption::value
in codepoints.
Maximum length of a SelectMenu::placeholder
in codepoints.
Maximum length of TextInput::label
.
Minimum length of TextInput::label
.
Maximum length of TextInput::value
.
Minimum length of TextInput::value
.
Maximum length of a TextInput::placeholder
in codepoints.
Functions
Ensure that an action row is correct.
Ensure that a button is correct.
Ensure that a top-level request component is correct.
Ensure that a select menu is correct.
Ensure that a text input is correct.