field validation and error handling for new post