'Ensure that either `icon_class` or `icon_image` is set'

def clean(self):

    super(ProviderConfig, self).clean()
    if (bool(self.icon_class) == bool(self.icon_image)):
        raise ValidationError('Either    an    icon    class    or    an    icon    image    must    be    given    (but    not    both)')
