validatedInput {shinyreforms} | R Documentation |
Use to create shiny input tags with validation. This should only be used in ShinyForm constructor.
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.
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) ) )