add validElementsForNode validator helper