added validations for posts