def make_extension_validator(base_cls, fn_names=(),
                             attributes=('description',)):
    """Create an extension validation function checking that key methods were
    overridden and attributes values provided.

    Parameters
    ----------
    base_cls : type
        Base class from which the contribution should inherit.

    fn_names : iterable[unicode], optional
        Names of the function the extensions must override.

    attributes : iterable[unicode], optional
        Names of the attributes the extension should provide values for.

    Returns
    -------
    validator : callable
        Function that can be used to validate an extension contribution.

    """
    def validator(contrib):
        """Validate the children of an extension.

        """
        for name in fn_names:
            member = getattr(contrib, name)
            # Compatibilty trick for Enaml declarative function (not necessary
            # for enaml compatible with Python 3)
            func = getattr(member, 'im_func',
                           getattr(member, '__func__', None))
            o_func = getattr(base_cls, name)
            if not func or func is o_func:
                msg = "%s '%s' does not declare a %s function"
                return False, msg % (base_cls, contrib.id, name)

        for attr in attributes:
            if not getattr(contrib, attr):
                msg = '%s %s does not provide a %s'
                return False, msg % (base_cls, contrib.id, attr)

        return True, ''

    doc = 'Ensure that %s subclasses does override %s' % (base_cls, fn_names)
    validator.__doc__ = doc

    return validator