Added validations to post model