title: shortening form validation jQuery code
body: <p>I have written this code, and it works just find, but I feel like I'm being very stupid here and that I could shorten this code. Is there anyway to shorten this?
  Please leave it as the answer, thank you.</p>
  
  <pre><code>$('.submit-form').on('click' , function() {
  
   if($('.form-signup1').val().length === 0) {
     $('.form-signup1').addClass('error')
   }
  
   if($('.form-signup2').val().length === 0) {
     $('.form-signup2').addClass('error')
   }
  
   if($('.form-signup3').val().length === 0) {
     $('.form-signup3').addClass('error')
   }
  
   if($('.form-signup4').val().length === 0) {
     $('.form-signup4').addClass('error')
   }
  
   if($('.form-signup5').val().length === 0) {
     $('.form-signup5').addClass('error')
   }
  
   if($('.form-signup6').val().length === 0) {
     $('.form-signup6').addClass('error')
   }
  
  });
  </code></pre>
  
  <p>EDIT: Thank you all so much for your answers, I really do appreciate your time. I chose the one that I could understand best. Thanks again!</p>