set alert-danger class for errors