(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
Validates the given field in the given form.
        :param form: form to validate
        :param field: field to validate
        :raise: ValidationError if the validation failed
Validates the given field in the given form . : param form : form to validate : param field : field to validate : raise : ValidationError if the validation failed
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)
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 )