It looks like because of jQuery mobile markup, try to insert the error element after the current element's parent
$("#newCustomer").validate({
errorPlacement: function(error, element) {
error.insertAfter(element.parent()); // <- the default
},
rules: {
surname: "required",
phoneNumber: "required"
},
messages: {
surname: "Please enter the surname/company name",
}
});
Demo: Fiddle
You may have to add some conditional placements based on the type of markup you are dealing with in certain situations