title: jQuery to validate a form (check for atleast 10 characters and certain value)
body: <p>On my webpage I have a form where a user enters information for their article. Right now I use jQuery to check if the entered values are not empty, if they are I show an error message.</p>
  
  <p><strong>Current validation</strong></p>
  
  <pre><code>//Story Form
  $('.error').hide(); //Hide error message initially
  
  $(".button").click(function() {         //On button click       
      $('.error').hide();  
      var title = $("input#sc_title").val();  
      if (title == "") {                    //if title is empty
          $("label#title_error").show();        //show error
          $("input#sc_title").focus();          //focus on title field
          return false;  
      } 
  });
  </code></pre>
  
  <p>Right now it only checks if <code>title == ""</code>. How would I edit the code to also check if there are at least 10 characters entered e.g. if title is empty and less than 10 chars are entered, show an error?</p>