Add code attribute to error message html