added validation and error message for comments