OpenQuizz
Une application de gestion des contenus pédagogiques
email Class Reference
Inheritance diagram for email:
Collaboration diagram for email:

Public Member Functions

def __init__ (self, check=False, ip=False, local=False, domains=None, exclude=None)
 
def error (self, value, msg=None)
 
def is_ip (self, value)
 
def __call__ (self, value)
 
def __schema__ (self)
 

Data Fields

 check
 
 ip
 
 local
 
 domains
 
 exclude
 

Detailed Description

Validate an email.

Example::

    parser = reqparse.RequestParser()
    parser.add_argument('email', type=inputs.email(dns=True))

Input to the ``email`` argument will be rejected if it does not match an email
and if 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 list|tuple domains: Restrict valid domains to this list
:param list|tuple exclude: Exclude some domains

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  check = False,
  ip = False,
  local = False,
  domains = None,
  exclude = None 
)

Member Function Documentation

◆ __call__()

def __call__ (   self,
  value 
)

◆ __schema__()

def __schema__ (   self)

◆ error()

def error (   self,
  value,
  msg = None 
)

◆ is_ip()

def is_ip (   self,
  value 
)

Field Documentation

◆ check

check

◆ domains

domains

◆ exclude

exclude

◆ ip

ip

◆ local

local

The documentation for this class was generated from the following file: