, , , , showErrors .
jquery/javascript span , . , , . , , div .
, , , . , - , . , .
showErrors: function(errorMap, errorList) {
var errorListSize = errorList.length;
this.defaultShowErrors();
if(errorListSize > 0) {
$('span.error').each(function() {
if($(this).closest('div.tooltip').size() == 0) {
$(this).wrap('<div class="tooltip"></div>').wrap('<div></div>').wrap('<div></div>');
}
});
}
},
html.
<div class="tooltip">
<div>
<div>
<span class="error">This field is required.</span>
</div>
</div>
</div>