Adding conditionals around error markup