adds validation to surveyDetail view.