added validations to post collection