add validation to Post model