code: def _validate(self, value):
          
          if self.values and value not in self.values:
              raise ValueError(
                  '{} is not a valid value for {}'.format(value, self.name))
docs: Validate the new value.