implement validation for new post form as well as tests for it