jQuery - Dynamically adding validation rule to multiple textboxes
<p>Hey,
I'm trying to add a validation rule to multiple textboxes dynamically. Here's the js:</p>

<pre><code>            //validate form.
            $("#SubmitForm").validate();
            $("input[id*=Hours]").rules("add", {
                number: true,
                messages: {
                    number: "Please enter a valid Hours"
                }
            });
</code></pre>

<p>This applies the rule to the very first textbox on the page with "Hours" in the id but then it doesn't apply it to any of the other ones.</p>

<p>Anyone know what's wrong here?</p>

<p>Thanks,
Justin</p>
