parameters: (self, form, field)
docstring: Validates the given field in the given form.
          :param form: form to validate
          :param field: field to validate
          :raise: ValidationError if the validation failed
docstring_summary: Validates the given field in the given form.
          :param form: form to validate
          :param field: field to validate
          :raise: ValidationError if the validation failed
docstring_tokens: Validates the given field in the given form . : param form : form to validate : param field : field to validate : raise : ValidationError if the validation failed
function: def __call__(self, form, field):
          """ Validates the given field in the given form.
          :param form: form to validate
          :param field: field to validate
          :raise: ValidationError if the validation failed
          """
          url = field.data
          regexes = [
              r"(git|https|ssh?)://[^\s]+$",
              r"[^\s@]+\@[^\s]+$",
          ]
          for regex in regexes:
              if re.match(regex, url, re.I):
                  return True
          else:
              raise ValidationError(self.message)
function_tokens: def __call__ ( self , form , field ) : url = field . data regexes = [ r"(git|https|ssh?)://[^\s]+$" , r"[^\s@]+\@[^\s]+$" , ] for regex in regexes : if re . match ( regex , url , re . I ) : return True else : raise ValidationError ( self . message )