Since you want to insert the error message before the invalid element, use insertBefore():
errorPlacement: function(error, element) {
error.insertBefore(element);
}
Since you want to insert the error message before the invalid element, use insertBefore():
errorPlacement: function(error, element) {
error.insertBefore(element);
}