Using the jQuery Validation plug-in for the following form:
I found that using .insertAfter rather than .appendTo works:
jQuery.validator.setDefaults({ errorPlacement: function(error, element) { error.insertAfter('#invalid-' + element.attr('id')); } });