Add error class to error span