

def validate(self, value):
    if self.validator:
        value = self.validator.validate(value)
    try:
        if (value in self.values):
            return value
    except TypeError:
        pass
    self.error(value)

dataset/ETHPy150Open sdispater/cleo/cleo/validators/__init__.py Enum.validate/original