Form validation - array loop?
<p>I have the following code, which works nicely:</p>

<pre><code>$('#register form .submit input').click(function(){    
    if(jQuery.trim($('#new-usr').val()) == '' || jQuery.trim($('#new-pwd').val()) == '' || jQuery.trim($('#new-pwd-confirm').val()) == ''){
      alert('Please fill in every required field (marked with an asterisk)');
      return false;
    }    
  });
</code></pre>

<p>However, I have a lot more fields to add to this and was thinking that there must be a way of storing the input ids in an array and looping through them, rather than adding a <code>jquery.trim($('#inputid').val()) == ''</code> for each one.</p>

<p>The jQuery validation plugin is a no-go in this instance for reasons that are too boring to go into here.</p>
