I am using jQuery validation plugin to check my inputs, and having troubles of adjusting the location of the error messages. Here is a demo of my code.
I would like to show the error message under the problematic cell, not next to it. I checked the reference and found I should focus on the errorPlacement
function. So if I would like to display the error message under the cell, should I create an new <tr>
and then insert the error message? Thanks for any suggestions.
$("#myform").validate({
errorPlacement: function(error, element) {
error.appendTo( element.parent("td").next("td") );
},
debug:true
})