code: def _validate(self, val):
          
          if callable(val):
              return val
  
          if self.allow_None and val is None:
              return
  
          if not _is_number(val):
              raise ValueError("Parameter '%s' only takes numeric values"%(self.name))
  
          if self.step is not None and not _is_number(self.step):
              raise ValueError("Step parameter can only be None or a numeric value")
  
          self._checkBounds(val)
docs: Checks that the value is numeric and that it is within the hard
          bounds; if not, an exception is raised.