|
OpenQuizz
Une application de gestion des contenus pédagogiques
|


Public Member Functions | |
| def | __init__ (self, check=False, ip=False, local=False, port=False, auth=False, schemes=None, domains=None, exclude=None) |
| def | error (self, value, details=None) |
| def | __call__ (self, value) |
| def | __schema__ (self) |
Data Fields | |
| check | |
| ip | |
| local | |
| port | |
| auth | |
| schemes | |
| domains | |
| exclude | |
Validate an URL.
Example::
parser = reqparse.RequestParser()
parser.add_argument('url', type=inputs.URL(schemes=['http', 'https']))
Input to the ``URL`` argument will be rejected
if it does not match an URL with specified constraints.
If ``check`` is True it will also be rejected if the domain does not exists.
:param bool check: Check the domain exists (perform a DNS resolution)
:param bool ip: Allow IP (both ipv4/ipv6) as domain
:param bool local: Allow localhost (both string or ip) as domain
:param bool port: Allow a port to be present
:param bool auth: Allow authentication to be present
:param list|tuple schemes: Restrict valid schemes to this list
:param list|tuple domains: Restrict valid domains to this list
:param list|tuple exclude: Exclude some domains
| def __init__ | ( | self, | |
check = False, |
|||
ip = False, |
|||
local = False, |
|||
port = False, |
|||
auth = False, |
|||
schemes = None, |
|||
domains = None, |
|||
exclude = None |
|||
| ) |
| def __call__ | ( | self, | |
| value | |||
| ) |
| def __schema__ | ( | self | ) |
| def error | ( | self, | |
| value, | |||
details = None |
|||
| ) |
| auth |
| check |
| domains |
| exclude |
| ip |
| local |
| port |
| schemes |