Is there a way to force only leaf tags to be allowed?

When using gameplay tags, say I have tags with a structure like Item.Weapon.Gun. These tags are being added to items to define their type. When adding them to items, I only want leaf tags to be considered a valid tag i.e. Item and Item.Weapon are not valid. If it matters, I still want to be able to use non-leaf tags elsewhere e.g. running a query for all items with Item.Weapon.

Is there a way, perhaps through UPROPERTY meta or in IsDataValid, to disallow the selecting of non-leaf tags? I of course mean without having to implement something manual like hard-coding that Item and Item.Weapon are invalid. I want something that scales well without additional maintenance such that later on we could add Item.Armor.Helmet and it would automatically handle that Item.Armor is invalid while Item.Armor.Helmet is valid.