title: Conditional error messages for Shiny App
body: <p>I have an app where you input your own data and then there are two select inputs where the user can select their dependent variable (column from inputted data) and multiple independent variables. I want to make it so if they select a column from their data that has a null value, an error message will immediately pop up telling them there is a null value. This is because if there is a null value then the app will not run and crash out when they hit the run button.</p>
  
  <p>My first thought was to use the validate command like this:</p>
  
  <pre><code>validate(
   need(is.na(input$yvariable), "Error: null value detected in variable")
   ))  
  </code></pre>
  
  <p>(input$yvariable being the dependent variable)</p>
  
  <p>However, this has not seemed to do anything when I apply it. I also tried using if-else statements to hide a helptext in the UI but also had no luck there. Again, it is important that the error pops up as soon as they select a column with any null values. Is there any clear way to pull this off? Has anyone done something similar?</p>
  
  <p>Thanks!</p>