I need to validate bunch of text boxes which has dynamic ID. The elements are available on document ready, not dynamically inserted.
<input type="text" class="y"/>
<input type="text" class="y"/>
<input type="text" class="y"/>
<input type="text" class="y"/>
<input type="text" class="y"/>
The rule is that one of the first two field is required. I'm lost how to validate without knowing ID of the element.
EDIT: Input elements are generated by loop so I cant add class required for first two. I'm looking for a solution using jquery Validation plugin http://docs.jquery.com/Plugins/Validation
namein order to submit?