Added validations to Post model