adds client-side validation to question inputs