docs: def validate(self, str_in):
          # type: (Text) -> None
          """ Validates an entry in the field.
  
              Raises `InvalidEntryError` iff the entry is invalid.
  
              An entry is invalid iff (1) the string does not represent a
              base-10 integer; (2) the integer is not between
              `self.minimum` and `self.maximum`, if those exist; or (3)
              the integer is negative.
  
              :param str str_in: String to validate.
              :raises InvalidEntryError: When entry is invalid.
          """
          if self.is_missing_value(str_in):
              return
          # noinspection PyCompatibility
          super().validate(str_in)
  
          try:
              value = int(str_in, base=10)
          except ValueError as e:
              msg = "Invalid integer. Read '{}'.".format(str_in)
              e_new = InvalidEntryError(msg)
              e_new.field_spec = self
              raise_from(e_new, e)
              return  # to stop PyCharm thinking that value might be undefined
              #  later
  
          if self.minimum is not None and value < self.minimum:
              msg = ("Expected integer value of at least {}. Read '{}'."
                     .format(self.minimum, value))
              e_new = InvalidEntryError(msg)
              e_new.field_spec = self
              raise e_new
  
          if self.maximum is not None and value > self.maximum:
              msg = ("Expected integer value of at most {}. Read '{}'."
                     .format(self.maximum, value))
              e_new = InvalidEntryError(msg)
              e_new.field_spec = self
              raise e_new