How do I get a textbox with particular ValidationGroup in jQuery?
<p>I have an ASP.NET TextBox ID="txtDate" in my usercontrol. It has ValidationGroup="MyUC" set. Now my UC is inside a Repeater Control. So there will be multiple instances of the same textbox. 
I am able to get all textboxes like: <code>$("[id$='_txtDate']");</code></p>

<p>Each of the txtDate will have a separate ValidationGroup assigned to it, dynamically.
So I want to get a textbox based on the id + ValidationGroup using jQuery / javascript.</p>

<p>How can it be done? Any guidance really appreciated.</p>

<p>Edited based on Josiah's Reply and the way I found:</p>

<p>Sorry, my scenario is kind of complicated to include entire code. In short the textboxes are attached to jquery datepicker and the code below runs when a date is selected. The same handler is attached to multiple textboxes. Here is what I have: </p>

<pre><code>var valgrp="MyGroup"; /*this mygroup is dynamic but keeping static for e.g.*/ 
var txtdate1 = $("[id$='txtDate']").filter(function(){if(this.Validators!=null){return this.Validators[0].validationGroup == valgrp;}});
var txtdate2 = $("[id$='txtDate']").filter(function(){return this.validationGroup == valgrp;});
alert("date1- " + txtdate1.val()); /*this returns date selected from datepicker*/
alert("date2 " + txtdate2.val()); /*this returns empty*/
</code></pre>

<p>Depending on the date I want to do something else. So txtdate1 is currently working for me where I don't have to add class to my textbox. I was playing with the txtdate2 which isn't behaving how I was expecting and so I had to post this question.</p>

<p>Here is a sample test to see this.validationGroup not returned:</p>

<pre><code> $(function () {
            $("#btntest").click(function () {
                $("[id$='txtDate']").each(function () {
                    alert(this.validationGroup);//returns undefined
                    alert(this.Validators[0].validationGroup); //returns "test"
                });
            });
        });
  &lt;input id="btntest" type="button" value="button" /&gt;
  &lt;asp:TextBox ID="txtDate" runat="server" ValidationGroup="test"&gt;&lt;/asp:TextBox&gt;
   &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Text="*" ErrorMessage="Required." ControlToValidate="txtDate" ValidationGroup="test"&gt;&lt;/asp:RequiredFieldValidator&gt;
</code></pre>
