added form validation for message posting