Add validation to post model.