Added validation logic for the multi-level wildcard in the topic.