code: def validate(self, instance, value):
          
          value = super(URL, self).validate(instance, value)
          parsed_url = urlparse(value)
          if not parsed_url.scheme or not parsed_url.netloc:
              self.error(instance, value, extra='URL needs scheme and netloc.')
          parse_result = ParseResult(
              scheme=parsed_url.scheme,
              netloc=parsed_url.netloc,
              path=parsed_url.path,
              params='' if self.remove_parameters else parsed_url.params,
              query='' if self.remove_parameters else parsed_url.query,
              fragment='' if self.remove_fragment else parsed_url.fragment,
          )
          parse_result = parse_result.geturl()
          return parse_result
docs: Check if input is valid URL