Description Usage Arguments Details Value Examples
View source: R/validated_input.R
Use to create shiny input tags with validation. This should only be used in ShinyForm constructor.
1 | validatedInput(tag, helpText = NULL, validators = c())
|
tag |
Tag to be modified. |
helpText |
Tooltip text. If NULL, no tooltip will be added. |
validators |
A vector of 'Validator' objects. |
The Shiny tag receives an additional attribute 'validators' which is a vector of 'Validator' objects.
A modified shiny input tag with attached validators and an optional tooltip div.
1 2 3 4 5 6 7 8 | shinyreforms::validatedInput(
shiny::textInput("text_input", label = "Username"),
helpText = "Username must have length between 4 and 12 characters.",
validators = c(
shinyreforms::ValidatorMinLength(4),
shinyreforms::ValidatorMaxLength(12)
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.