code: def _validate_max(self, proposal):
          
          max = proposal['value']
          if max < self.min:
              raise TraitError('setting max < min')
          if max < self.value:
              self.value = max
          return max
docs: Enforce min <= value <= max