jQuery Validate array input element which is created dynamically
Regarding your code for creating the new fields: // Mode 1 $(“#addInput”).on(‘click’, function () { $(‘#inputs’).append($(‘<input class=”comment” name=”name[]” />’)); }); The entire reason your “Mode 1” was not working is because you’ve assigned the same exact name attribute, name=”name[]”, to every single new input. The jQuery Validate plugin absolutely requires that every input element have … Read more