I am doing 'Add more' functionality in skills.
So i have form like,
<form id="myform">
<a id="add_more">Add more</a>
<div id="skills_wrap">
<input type="text" name="skills[]">
</div>
<input type="submit" name="submit">
</form>
And script is like,
<script>
$(document).on("click","#add_more",function(){
$("#skills_wrap").append('<input type="text" name="skills[]">');
});
$("#myform").validate({
rules:{
"skills[]":{ required:true }
}
});
</script>
Here, validation works for first textbox only. For add more skills textbox validation does not work.
Any solution would be much appreciated.