title: How to check empty datatables using jquery validate
body: <p>I want validate my table if empty. my table using datatables to add data.</p>
  
  <pre><code>&lt;form method="post" id="form"&gt;
    &lt;input type="text" id="txt" required&gt;
    &lt;table id="table"&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th&gt;No.&lt;/th&gt;
          &lt;th&gt;Name&lt;/th&gt;
          &lt;th&gt;Address&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
    &lt;/table&gt;
  &lt;button id="button" type="submit"&gt;Save&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>my jquery:</p>
  
  <pre><code>$(document).ready(function () {
    var grid = $('#table').DataTable();
  
    grid.row.add([
      '1',
      'Jake',
      'England'
    ]).draw(false);
  
    $("#form").validate({
      submitHandler: function (form) {
        form.submit();
      }
    });
  });
  </code></pre>
  
  <p>If input. I'm just add required attribute. but how to check <code>datatables</code> if the table empty. If I'm not add some item. It's will be return message error in above table or top table</p>
  
  <p><strong>NB:</strong> this how to check datatables empty <code>table.data().any()</code></p>