add validation and display errors to the new post page