Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- validators_URL_gopher = re.compile(r'''
- ^(http|https|gopher)://
- (?:[%:\w]*@)? # authenticator
- (?P<domain>[a-z0-9][a-z0-9\-]{1,62}\.)* # (sub)domain - alpha followed by 62max chars (63 total)
- (?P<tld>[a-z]{2,}) # TLD
- (?::[0-9]+)? # port
- # files/delims/etc
- (?P<path>/[a-z0-9\-\._~:/\?#\[\]@!%\$&\'\(\)\*\+,;=]*)?
- $
- ''', re.I | re.VERBOSE)
- class SaveBookmarkForm(formencode.Schema):
- """ Handle the save bookmark form """
- tbUrl = validators.URL(not_empty=True, url_re=validators_URL_gopher)
Add Comment
Please, Sign In to add comment