I have form and form text field which generates dynamically using JSP. And I\'m using Jquery validation but want to add functionlaty to prevent duplicate entry in the form.<
If I'm not mistaken, you could narrow the duplicate comparison down a bit. For example, I just want to look at other fields of the same class, say 'name':
$(parentForm.find('.name')).each(function () {
if ($(this).val() === value) {
timeRepeated++;
}
or maybe:
$('.name').each(function () {
if ($(this).val() === value) {
timeRepeated++;
}