def validate(self, value):
        if self.validator:
            value = self.validator.validate(value)

        if self.min is not None:
            if value < self.min \
                or (value == self.min
                    and self.include_min is False):
                self.error(value)

        if self.max is not None:
            if value > self.max \
                or (value == self.max
                    and self.include_max is False):
                self.error(value)

        return value
dataset/ETHPy150Open sdispater/cleo/cleo/validators/__init__.py/Range.validate/original