#[non_exhaustive]pub enum ComponentValidationErrorType {
Show 20 variants
ActionRowComponentCount {
count: usize,
},
ButtonConflict,
ButtonStyle {
style: ButtonStyle,
},
ComponentCount {
count: usize,
},
ComponentCustomIdLength {
chars: usize,
},
ComponentLabelLength {
chars: usize,
},
InvalidChildComponent {
kind: ComponentType,
},
InvalidRootComponent {
kind: ComponentType,
},
SelectMaximumValuesCount {
count: usize,
},
SelectMinimumValuesCount {
count: usize,
},
SelectOptionCount {
count: usize,
},
SelectOptionDescriptionLength {
chars: usize,
},
SelectOptionLabelLength {
chars: usize,
},
SelectOptionValueLength {
chars: usize,
},
SelectPlaceholderLength {
chars: usize,
},
TextInputLabelLength {
len: usize,
},
TextInputMaxLength {
len: usize,
},
TextInputMinLength {
len: usize,
},
TextInputPlaceholderLength {
chars: usize,
},
TextInputValueLength {
chars: usize,
},
}
Expand description
Type of ComponentValidationError
that occurred.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ActionRowComponentCount
Number of components a provided ActionRow
is larger than
the maximum.
ButtonConflict
Button has both a custom ID and URL set.
ButtonStyle
Fields
style: ButtonStyle
Style of the button.
Button does not have the required field based on its style.
A button with a style of ButtonStyle::Link
must have a URL set,
while buttons of other styles must have a custom ID set.
ComponentCount
Number of components provided is larger than the maximum.
ComponentCustomIdLength
Component custom ID is larger than the the maximum.
ComponentLabelLength
Component label is larger than the maximum.
InvalidChildComponent
Fields
kind: ComponentType
Type of provided component.
Provided component cannot be a child component.
InvalidRootComponent
Fields
kind: ComponentType
Type of provided component.
Provided component cannot be a root component.
SelectMaximumValuesCount
Maximum number of items that can be chosen is smaller than the minimum or larger than the maximum.
SelectMinimumValuesCount
Minimum number of items that must be chosen is larger than the maximum.
SelectOptionCount
Number of select menu options provided is larger than the maximum.
SelectOptionDescriptionLength
Description of a select menu option is larger than the maximum.
SelectOptionLabelLength
Label of a select menu option is larger than the maximum.
SelectOptionValueLength
Value of a select menu option is larger than the maximum.
SelectPlaceholderLength
Placeholder of a component is larger than the maximum.
TextInputLabelLength
TextInput::label
is invalid.
TextInputMaxLength
TextInput::max_length
is invalid.
TextInputMinLength
TextInput::min_length
is too long.
TextInputPlaceholderLength
Placeholder of a TextInput
component is larger than
TEXT_INPUT_PLACEHOLDER_MAX
.
TextInputValueLength
Value of a TextInput
component is larger than
TEXT_INPUT_LENGTH_MAX
.