Clarify usage of `match()` for regex validator

- Closes #277
This commit is contained in:
Steve Piercy 2017-01-13 22:10:34 -08:00
parent 654ba507c1
commit f3288db7f9
1 changed files with 2 additions and 0 deletions

View File

@ -320,6 +320,8 @@ class Regex(object):
uses Python's :py:func:`re.match`, which only matches at the beginning
of the string and not at the beginning of each line. To match the
entire string, enclose the regular expression with ``^`` and ``$``.
If ``msg`` is supplied, it will be the error message to be used;
otherwise, defaults to 'String does not match expected pattern'.
The ``regex`` expression behaviour can be modified by specifying
any ``flags`` value taken by ``re.compile``.