title: jQuery return not working as expected
body: <p>The following function validates empty field correctly:</p>
  
  <pre><code>function empty_field(element){
      element.each(function(){
          if($(this).val() == ''){
              $(this).addClass('error');
          }
          else{
              $(this).removeClass('error');
              return true;
          }
      });
  }
  </code></pre>
  
  <p>However I want to check that the validation is complete by doing the following:</p>
  
  <pre><code>        submit.click(function(e){
              e.preventDefault();
  
                              var input = $('.input');
  
              if(empty_field(input))//if the form is valid
              {
                  console.log('form validated');
              }
  
          });
  </code></pre>
  
  <p>When I click on the submit button the forms gets validated but the console log doesn't work meaning that maybe the condition is wrong.</p>
  
  <p>Any help?</p>