OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, typing.Union[str, bytes, typing.Pattern] regex, int flags=0, *typing.Optional[str] error=None) |
str | __call__ (self, str value) |
bytes | __call__ (self, bytes value) |
def | __call__ (self, value) |
![]() | |
str | __repr__ (self) |
typing.Any | __call__ (self, typing.Any value) |
Data Fields | |
regex | |
error | |
Static Public Attributes | |
default_message | |
![]() | |
error | |
Validator which succeeds if the ``value`` matches ``regex``. .. note:: Uses `re.match`, which searches for a match at the beginning of a string. :param regex: The regular expression string to use. Can also be a compiled regular expression pattern. :param flags: The regexp flags to use, for example re.IGNORECASE. Ignored if ``regex`` is not a string. :param error: Error message to raise in case of a validation error. Can be interpolated with `{input}` and `{regex}`.
def __init__ | ( | self, | |
typing.Union[str, bytes, typing.Pattern] | regex, | ||
int | flags = 0 , |
||
*typing.Optional[str] | error = None |
||
) |
bytes __call__ | ( | self, | |
bytes | value | ||
) |
str __call__ | ( | self, | |
str | value | ||
) |
def __call__ | ( | self, | |
value | |||
) |
|
static |
error |
regex |