Added validations to model to ensure category uniqueness and post attribute presence