title: ShinyAlert - checks if field is empty
body: <p>I've some pop-up ShinyAlert that asked text from the user.
  I want to display a msg to the user (in the pop-up) if the user click on 'add'
  and the text box is still empty. the msg: &quot;text is must&quot;.</p>
  <p>if there is some text in the field - close the pop-up window.
  if the field is empty - without closing the pop-up window and display an error msg.
  any help will be welcome.</p>
  <pre><code>library(shiny)
  library(shinyalert)
  
  ui &lt;- fluidPage(
    useShinyalert()
  )
  
  server &lt;- function(input, output) {
    shinyalert(
      title = &quot;Title&quot;,
      type = &quot;info&quot;,
      confirmButtonText = &quot;add&quot;,
      cancelButtonText = &quot;cancel&quot;,
      showCancelButton = TRUE,
      showConfirmButton = TRUE,
      confirmButtonCol = &quot;#6DBADE&quot;,
      size = &quot;m&quot;, 
      closeOnEsc = TRUE,
      closeOnClickOutside = TRUE,
      animation = TRUE,
      callbackJS =&quot;function(x) { if (x !== false) {
       {Shiny.setInputValue('userInputs', [$('#add_nosha_title').val(), $('#add_nosha_tohen').val(), $('#add_nosha_nosha').val(), $('#add_nosha_worker').val(), $('#ccancel').val(),]);}}}&quot;,
      callbackR = function(y) {
        global$response &lt;- y
      },
      html = TRUE,
      text =  
        div(HTML(&quot;
            &lt;form style = ' display:flex; flex-direction: row; justify-content: center; align-items: center' action=''&gt;
             &lt;div style='border: 5px  black;'&gt;
             &lt;p style = 'color:black; font-size:12px';&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;:TEXT&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
             &lt;input type='text'name='add_nosha_title' id='add_nosha_title'  dir='rtl' style='border-color: black; font-size: 12px;height: 45px; width: 400px; display: block;'/&gt;&lt;/input&gt;
            &lt;br&gt;&lt;br&gt;&lt;br&gt;
            &lt;/form&gt;&quot;))
      
    )
  }
  
  shinyApp(ui, server)
  
  </code></pre>