Due to space limitations I'm trying to place the error messages for a form inside tooltips.
$("form").validate({
rules: {
username: { required: true, email: true },
password: "required"
},
onkeyup: true,
success: "valid",
errorPlacement: function(error, element) {
var msg = errorList[i].message;
element.attr('title', msg);
}
});
The element.attr part works fine- I'm just having trouble extracting the message to put in it. Where does it reside?