Core: #1223: pass also validated element to renderErrorMessage method