'Validate that filter_horizontal is a sequence of field names.'

def validate_filter_horizontal(self, cls, model):

    if hasattr(cls, 'filter_horizontal'):
        check_isseq(cls, 'filter_horizontal', cls.filter_horizontal)
        for (idx, field) in enumerate(cls.filter_horizontal):
            f = get_field(cls, model, 'filter_horizontal', field)
            if (not isinstance(f, models.ManyToManyField)):
                raise ImproperlyConfigured(("'%s.filter_horizontal[%d]'    must    be    a    ManyToManyField." % (cls.__name__, idx)))
