Adding validations for posts and comments