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

Public Member Functions

def __init__ (self, pattern)
 
def __call__ (self, value)
 
def __deepcopy__ (self, memo)
 
def __schema__ (self)
 

Data Fields

 pattern
 
 re
 

Detailed Description

Validate a string based on a regular expression.

Example::

    parser = reqparse.RequestParser()
    parser.add_argument('example', type=inputs.regex('^[0-9]+$'))

Input to the ``example`` argument will be rejected if it contains anything
but numbers.

:param str pattern: The regular expression the input must match

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  pattern 
)

Member Function Documentation

◆ __call__()

def __call__ (   self,
  value 
)

◆ __deepcopy__()

def __deepcopy__ (   self,
  memo 
)

◆ __schema__()

def __schema__ (   self)

Field Documentation

◆ pattern

pattern

◆ re

re

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