validatedInput function

Add validator to a Shiny input.