Attributes

Class: Regex

A field that is validated by a specifiable regular expression, and otherwise treated as a string.

Note that, like all other fields in this module, leading and trailing whitespace are stripped from input -- it is a subclass of String, after all. This is done before checking against the pattern, so any pattern that expects such whitespace will fail to match. Also note that empty input is converted to None, and pattern matching is skipped.

Methods

has_value (self, input)

Return whether a value has been provided for the field in the given MultiDict of input.

required (self)

Return whether the field is mandatory.

translate (self, input)

Translate the field from a MultiDict of values.

Attributes

Value of

None