code: def validate(self, raw_data, **kwargs):
          
          try:
              converted_data = int(raw_data)
              return super(IntegerField, self).validate(converted_data)
          except ValueError:
              raise ValidationException(self.messages['invalid'], repr(raw_data))
docs: Convert the raw_data to an integer.