

def register(self, validator):
    if (not issubclass(validator, Validator)):
        raise Exception('A validator must be a subclass of the Validator class')
    if hasattr(validator, 'name'):
        if isinstance(validator.name, (list, tuple)):
            for name in validator.name:
                self._register_validator(name, validator)
        else:
            self._register_validator(validator.name, validator)

dataset/ETHPy150Open sdispater/cleo/cleo/validators/__init__.py ValidatorSet.register/original