本文参照:
指定错误提示的位置
And this validate code:
$("#myform").validate({ rules: { fname: { required: true }, lname: { required: true } }, groups: { username: "fname lname" }, errorPlacement: function(error, element) { if (element.attr("name") == "fname" || element.attr("name") == "lname" ) error.insertAfter("#lname"); else error.insertAfter(element); } })