add validation to post model