Expand description
Constants, error types, and functions for validating [Component]s.
Structs§
- Component
Validation Error - A provided [
Component] is invalid.
Enums§
- Component
Validation Error Type - Type of
ComponentValidationErrorthat occurred.
Constants§
- ACTION_
ROW_ COMPONENT_ COUNT - Maximum number of [
Component]s allowed inside an [ActionRow]. - COMPONENT_
BUTTON_ LABEL_ LENGTH - Maximum [
Component] label length in codepoints. - COMPONENT_
COUNT - Maximum number of root [
Component]s in a message. - COMPONENT_
CUSTOM_ ID_ LENGTH - Maximum length of a [
Component] custom ID in codepoints. - COMPONENT_
V2_ COUNT - Maximum total number of [
Component]s in a component V2 message. - SELECT_
MAXIMUM_ VALUES_ LIMIT - Maximum number of [
SelectMenuOption]s that can be chosen in a [SelectMenu]. - SELECT_
MAXIMUM_ VALUES_ REQUIREMENT - Minimum number of [
SelectMenuOption]s that can be chosen in a [SelectMenu]. - SELECT_
MINIMUM_ VALUES_ LIMIT - Maximum number of [
SelectMenuOption]s that must be chosen in a [SelectMenu]. - SELECT_
OPTION_ COUNT - Maximum number of [
SelectMenuOption]s in a [SelectMenu]. - SELECT_
OPTION_ DESCRIPTION_ LENGTH - Maximum length of a [
SelectMenuOption::description] in codepoints. - SELECT_
OPTION_ LABEL_ LENGTH - Maximum length of a [
SelectMenuOption::label] in codepoints. - SELECT_
OPTION_ VALUE_ LENGTH - Maximum length of a [
SelectMenuOption::value] in codepoints. - SELECT_
PLACEHOLDER_ LENGTH - Maximum length of a [
SelectMenu::placeholder] in codepoints. - TEXT_
INPUT_ LABEL_ MAX - Maximum length of [
TextInput::label]. - TEXT_
INPUT_ LABEL_ MIN - Minimum length of [
TextInput::label]. - TEXT_
INPUT_ LENGTH_ MAX - Maximum length of [
TextInput::value]. - TEXT_
INPUT_ LENGTH_ MIN - Minimum length of [
TextInput::value]. - TEXT_
INPUT_ PLACEHOLDER_ MAX - Maximum length of a [
TextInput::placeholder] in codepoints.
Functions§
- action_
row - Ensure that an action row is correct.
- button
- Ensure that a button is correct.
- component
Deprecated - Ensure that a top-level request component is correct in V1.
- component_
v1 - Ensure that a top-level request component is correct in V1.
- component_
v2 - Ensure that a top-level request component is correct in V2.
- container
- Validates a container component.
- media_
gallery - Validates a media gallery component.
- section
- Validates a section component.
- select_
menu - Ensure that a select menu is correct.
- text_
display - Validates a text display component.
- text_
input - Ensure that a text input is correct.
- thumbnail
- Validates a thumbnail component.