title: jQuery check if all required inputs from a form are not empty
body: <p>Imagine a simple form with method <code>POST</code> and 30 inputs.</p>
  
  <p>I would like to create a jQuery function that will be called from submit button. I searched about how to check all inputs that are required, but didn't find anything to help.</p>
  
  <p>I would like something like this:</p>
  
  <pre><code>var inputs_required = all inputs from my form which have attribute required;
  function check_required_inputs() {
     if(inputs_required != "") {
       //create ajax with serialize() and submit form;
     }
  } else {
     //highlight inputs that are empty and show a message;
  }
  </code></pre>
  
  <p>Can this be achieved in jQuery?</p>