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

Public Member Functions

def __init__ (self, comparable, *typing.Optional[str] error=None)
 
_T __call__ (self, _T value)
 
- Public Member Functions inherited from Validator
str __repr__ (self)
 
typing.Any __call__ (self, typing.Any value)
 

Data Fields

 comparable
 
 error
 

Static Public Attributes

 default_message
 
- Static Public Attributes inherited from Validator
 error
 

Detailed Description

Validator which succeeds if the ``value`` passed to it is
equal to ``comparable``.

:param comparable: The object to compare to.
:param error: Error message to raise in case of a validation error.
    Can be interpolated with `{input}` and `{other}`.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  comparable,
*typing.Optional[str]   error = None 
)

Member Function Documentation

◆ __call__()

_T __call__ (   self,
_T  value 
)

Field Documentation

◆ comparable

comparable

◆ default_message

default_message
static

◆ error

error

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