'Check that `raw_id_fields` only contains field names that are listed
on the model.'

def _check_raw_id_fields(self, obj):

    if (not isinstance(obj.raw_id_fields, (list, tuple))):
        return must_be('a    list    or    tuple', option='raw_id_fields', obj=obj, id='admin.E001')
    else:
        return list(chain.from_iterable((self._check_raw_id_fields_item(obj, obj.model, field_name, ('raw_id_fields[%d]' % index)) for (index, field_name) in enumerate(obj.raw_id_fields))))
