add validation to chat controller