title: Preventing a form from submitting when filled with new lines only
body: <p>so I have a form that has a textarea and i don't want the form to be sent if the textarea is filled with just spaces or new lines <code>\n</code>, for the first condition i do</p>
  
  <pre><code>$("textarea").val().replace(/\u0020+/gm, ' ');
  if($("textarea").val().length&lt;2) return;
  </code></pre>
  
  <p>but i don't know how to prevent the form from submitting when the textarea is filled with new lines only.</p>