pub fn text_input(
text_input: &TextInput,
label_allowed: bool,
) -> Result<(), ComponentValidationError>Expand description
Ensure that a text input is correct.
The label_allowed parameter determines whether the deprecated [TextInput::label] field is
allowed in this context.
It should be disallowed if the text input component is place within a label component.
ยงErrors
Returns an error of type TextInputDisallowedLabel if label_allowed is false and
the label field of this text input is set.
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.