twilight_validate::component

Function text_input

source
pub fn text_input(
    text_input: &TextInput,
) -> Result<(), ComponentValidationError>
Expand description

Ensure that a text input is correct.

ยงErrors

Returns an error of type ComponentCustomIdLength if the provided custom ID is too long.

Returns an error of type ComponentLabelLength if the provided button label is too long.

Returns an error of type TextInputMaxLength if the length is invalid.

Returns an error of type TextInputMinLength if the length is invalid.

Returns an error of type TextInputPlaceholderLength if the provided placeholder is too long.

Returns an error of type TextInputValueLength if the length is invalid.