jQuery Validation: Validate dynamicly generated fields only on the first field
<p>Yes, I know this question has been asked a few times before. But I am confused with the answers. I thought I would have to somehow 'refresh' or use live to add the validation each time I add a new input field.</p>

<p>Also I checked out the <a href="http://jquery.bassistance.de/validate/demo/dynamic-totals.html" rel="nofollow">demo</a> and I think I am missing something. I don't really see any code that adds validation each time a new field gets added. </p>

<p>This is a simplified version of my code:</p>

<pre><code>$(function(){
  $('#testform').validate();

  var input1 = $('&lt;input type="text" class="required" /&gt;'):
  var input2 = $('&lt;input type="text" class="required" /&gt;'):
  var input3 = $('&lt;input type="text" class="required" /&gt;'):

  $('#testform').append(input1)
                .append(input2)
                .append(input3);
});
</code></pre>

<p>My html looks something like this:</p>

<pre><code>&lt;form id='testform'&gt;
    &lt;input type='submit' value='submit' /&gt;
&lt;/form&gt;
</code></pre>

<p>For some reason validation only works on the first element. If you fill in text it works on the onblur event. But the form will submit once the first input field has text.</p>

<p>Actually I think just found the answer while typing this but I'll add this question anyway in case others run into the same problem. If this is a problem I'll remove it right away.</p>
