Text validators
MustMatchRegex(regex, /, *, match_type='match', flags=0, err_msg=None, extra_msg_args=None)
Bases: Validator
Validates that the value matches the provided regular expression.
| PARAMETER | DESCRIPTION |
|---|---|
regex
|
The regular expression to validate.
TYPE:
|
match_type
|
The type of match to perform. Must be one of 'match', 'fullmatch', or 'search'.
TYPE:
|
flags
|
Optional regex flags to modify the regex behavior. If
TYPE:
|
err_msg
|
error message.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the value does not match the regex pattern. |