It may be that the ui-tabs-panel class isn't the first part of the class attribute's value. I think that selector is too specific IMO, and I would change it to:
closest('div.ui-tabs-panel')
As an aside, you should use prop, not attr.
Hope this helps.
P.S. And Floremin is correct, it should be Append, not AppendTo.
Further edit: you may have multiple validation errors, so you actually need to do an each on them, like so:
$(document).ready(function(){
$('.validationError:visible').each(function(i, e) {
var finderror = $(e).closest('div.ui-tabs-panel').prop('id');
$('li a[@href*=' + finderror + ']').removeClass("validationError").addClass("validationError");
});
});
Instead of the exclamation, I would do it with a class.
The working code!
$('.validationError:visible').each(function(i, e) {
var finderror = $(e).closest('div#tabs > div').prop('id');
var errorInf = $('li a[href=#' + finderror + ']');
$(errorInf).append('<span style="color: red; padding: 2px; font-size: 16px;">!</span>');
});
});