Module ImportFrom alias ImportFrom alias ImportFrom alias alias ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq AttributeLoad NameLoad attr Str body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults body If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults body If Call NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str Assign NameStore TupleLoad FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareNotIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIsNot AttributeLoad NameLoad attr NameLoad body Return NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str Assign NameStore Num FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareGt Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str Return NameLoad decorator_list decorator_list Assign NameStore NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str Assign NameStore Num FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareLt Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str Assign NameStore Num Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr If BoolOpOr CompareLt NameLoad AttributeLoad NameLoad attr CompareGt NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If UnaryOpNot CompareLt AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If UnaryOpNot CompareLtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If UnaryOpNot CompareGt AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If UnaryOpNot CompareGtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If AttributeLoad NameLoad attr body If UnaryOpNot CompareLtELtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str orelse If UnaryOpNot CompareLtLt AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str Assign NameStore TupleLoad Assign NameStore Lambda arguments args NameParam defaults NameLoad FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str If UnaryOpNot NameLoad body Assert AttributeLoad NameLoad attr Str orelse Assert CompareGt Call NameLoad NameLoad Num Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num If Call NameLoad GeneratorExp CompareEq Call NameLoad NameLoad NameLoad comprehension NameStore SubscriptLoad NameLoad Slice Num body Return NameLoad Assign NameStore Call AttributeLoad Str attr GeneratorExp AttributeLoad NameLoad attr comprehension NameStore SubscriptLoad NameLoad Slice Num Assign NameStore AttributeLoad SubscriptLoad NameLoad Index Num attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str keyword NameLoad keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str decorator_list
N/A operator attrgetter flatland.util Unspecified base N_ Validator Present N/A Validator N/A N/A Validates that a value is present.

    **Messages**

    .. attribute:: missing

      Emitted if the :attr:`~flatland.schema.base.Element.u` string
      value of the element is empty, as in the case for an HTML form
      submitted with an input box left blank.

     N/A missing N/A N_ %(label)s may not be blank. validate N/A N/A self element state N/A N/A N/A N/A N/A element u N/A N/A N/A N/A self note_error element state missing N/A True N/A N/A IsTrue N/A Validator N/A N/A Validates that a value evaluates to true.

    **Messages**

    .. attribute:: false

      Emitted if ``bool(element.value)`` is not True.

     N/A false N/A N_ %(label)s must be True. validate N/A N/A self element state N/A N/A N/A N/A N/A bool N/A element value N/A N/A N/A N/A self note_error element state false N/A True N/A N/A IsFalse N/A Validator N/A N/A Validates that a value evaluates to false.

    **Messages**

    .. attribute:: true

      Emitted if ``bool(element.value)`` is not False.

     N/A true N/A N_ %(label)s must be False. validate N/A N/A self element state N/A N/A N/A N/A bool N/A element value N/A N/A N/A N/A self note_error element state true N/A True N/A N/A ValueIn N/A Validator N/A N/A Validates that the value is within a set of possible values.

    Example:

    .. testcode::

      import flatland
      from flatland.validation import ValueIn

      is_yesno = ValueIn(valid_options=['yes', 'no'])
      schema = flatland.String('yn', validators=[is_yesno])

    **Attributes**

    .. attribute:: valid_options

      A list, set, or other container of valid element values.

    **Messages**

    .. attribute:: fail

      Emitted if the element's value is not within the *valid_options*.

     N/A fail N/A N_ %(value)s is not a valid value for %(label)s. N/A valid_options N/A __init__ N/A N/A self valid_options N/A Unspecified kw N/A N/A N/A N/A Validator __init__ self kw N/A N/A valid_options Unspecified N/A N/A N/A self valid_options valid_options N/A validate N/A N/A self element state N/A N/A N/A N/A N/A element value N/A self valid_options N/A N/A N/A N/A self note_error element state fail N/A True N/A N/A Converted N/A Validator N/A N/A Validates that an element was converted to a Python value.

    Example:

    .. testcode::

      import flatland
      from flatland.validation import Converted

      not_bogus = Converted(incorrect='Please enter a valid date.')
      schema = flatland.DateTime('when', validators=[not_bogus])

    **Messages**

    .. attribute:: incorrect

      Emitted if the :attr:`~flatland.schema.base.Element.value` is
      None.

     N/A incorrect N/A N_ %(label)s is not correct. validate N/A N/A self element state N/A N/A N/A N/A N/A element value None N/A N/A True N/A N/A N/A self note_error element state incorrect N/A N/A ShorterThan N/A Validator N/A N/A Validates the length of an element's string value is less than a bound.

    Example:

    .. testcode::

      import flatland
      from flatland.validation import ShorterThan

      valid_length = ShorterThan(8)
      schema = flatland.String('password', validators=[valid_length])

    **Attributes**

    .. attribute:: maxlength

      A maximum character length for the
      :attr:`~flatland.schema.base.Element.u`.

      This attribute may be supplied as the first positional argument
      to the constructor.

    **Messages**

    .. attribute:: exceeded

      Emitted if the length of the element's string value exceeds
      *maxlength*.

     N/A exceeded N/A N_ %(label)s may not exceed %(maxlength)s characters. N/A maxlength 0 __init__ N/A N/A self maxlength N/A Unspecified kw N/A N/A N/A N/A Validator __init__ self kw N/A N/A maxlength Unspecified N/A N/A N/A self maxlength maxlength N/A validate N/A N/A self element state N/A N/A N/A N/A N/A len N/A element u N/A self maxlength N/A N/A N/A N/A self note_error element state exceeded N/A True N/A N/A N/A NoLongerThan ShorterThan LongerThan N/A Validator N/A N/A Validates the length of an element's string value is more than a bound.

    Example:

    .. testcode::

      import flatland
      from flatland.validation import LongerThan

      valid_length = LongerThan(4)
      schema = flatland.String('password', validators=[valid_length])

    **Attributes**

    .. attribute:: minlength

      A minimum character length for the
      :attr:`~flatland.schema.base.Element.u`.

      This attribute may be supplied as the first positional argument
      to the constructor.

    **Messages**

    .. attribute:: short

      Emitted if the length of the element's string value falls short
      of *minlength*.

     N/A short N/A N_ %(label)s must be at least %(minlength)s characters. N/A minlength 0 __init__ N/A N/A self minlength N/A Unspecified kw N/A N/A N/A N/A Validator __init__ self kw N/A N/A minlength Unspecified N/A N/A N/A self minlength minlength N/A validate N/A N/A self element state N/A N/A N/A N/A N/A len N/A element u N/A self minlength N/A N/A N/A N/A self note_error element state short N/A True N/A N/A LengthBetween N/A Validator N/A N/A Validates the length of an element's string value is within bounds.

    Example:

    .. testcode::

      import flatland
      from flatland.validation import LengthBetween

      valid_length = LengthBetween(4, 8)
      schema = flatland.String('password', validators=[valid_length])

    **Attributes**

    .. attribute:: minlength

      A minimum character length for the
      :attr:`~flatland.schema.base.Element.u`.

      This attribute may be supplied as the first positional argument
      to the constructor.

    .. attribute:: maxlength

      A maximum character length for the
      :attr:`~flatland.schema.base.Element.u`.

      This attribute may be supplied as the second positional argument
      to the constructor.

    **Messages**

    .. attribute:: breached

      Emitted if the length of the element's string value is less than
      *minlength* or greater than *maxlength*.

     N/A breached N/A N_ %(label)s must be between %(minlength)s and %(maxlength)s characters long. N/A minlength 0 N/A maxlength 0 __init__ N/A N/A self minlength maxlength N/A Unspecified Unspecified kw N/A N/A N/A N/A Validator __init__ self kw N/A N/A minlength Unspecified N/A N/A N/A self minlength minlength N/A N/A maxlength Unspecified N/A N/A N/A self maxlength maxlength N/A validate N/A N/A self element state N/A N/A N/A l N/A len N/A element u N/A N/A N/A l N/A self minlength N/A l N/A self maxlength N/A N/A N/A N/A self note_error element state breached N/A True N/A N/A ValueLessThan N/A Validator N/A N/A A validator that ensures that the value is less than a limit.

    Example:

    .. testcode::

      import flatland
      from flatland.validation import ValueLessThan

      schema = flatland.Integer('wishes', validators=[ValueLessThan(boundary=4)])

    **Attributes**

    .. attribute:: boundary

      Any comparable object.

    **Messages**

    .. attribute:: failure

      Emitted if the value is greater than or equal to :attr:`boundary`.

     N/A failure N/A N_ %(label)s must be less than %(boundary)s. __init__ N/A N/A self boundary N/A kw N/A N/A N/A N/A Validator __init__ self kw N/A N/A self boundary boundary N/A validate N/A N/A self element state N/A N/A N/A N/A N/A N/A element value N/A self boundary N/A N/A N/A N/A self note_error element state failure N/A True N/A N/A ValueAtMost N/A Validator N/A N/A A validator that enforces a maximum value.

    Example:

    .. testcode::

      import flatland
      from flatland.validation import ValueAtMost

      schema = flatland.Integer('wishes', validators=[ValueAtMost(maximum=3)])

    **Attributes**

    .. attribute:: maximum

      Any comparable object.

    **Messages**

    .. attribute:: failure

      Emitted if the value is greater than :attr:`maximum`.

     N/A failure N/A N_ %(label)s must be less than or equal to %(maximum)s. __init__ N/A N/A self maximum N/A kw N/A N/A N/A N/A Validator __init__ self kw N/A N/A self maximum maximum N/A validate N/A N/A self element state N/A N/A N/A N/A N/A N/A element value N/A self maximum N/A N/A N/A N/A self note_error element state failure N/A True N/A N/A ValueGreaterThan N/A Validator N/A N/A A validator that ensures that a value is greater than a limit.

    Example:

    .. testcode::

      import flatland
      from flatland.validation import ValueGreaterThan

      schema = flatland.Integer('wishes', validators=[ValueGreaterThan(boundary=4)])

    **Attributes**

    .. attribute:: boundary

      Any comparable object.

    **Messages**

    .. attribute:: failure

      Emitted if the value is greater than or equal to :attr:`boundary`.

     N/A failure N/A N_ %(label)s must be greater than %(boundary)s. __init__ N/A N/A self boundary N/A kw N/A N/A N/A N/A Validator __init__ self kw N/A N/A self boundary boundary N/A validate N/A N/A self element state N/A N/A N/A N/A N/A N/A element value N/A self boundary N/A N/A N/A N/A self note_error element state failure N/A True N/A N/A ValueAtLeast N/A Validator N/A N/A A validator that enforces a minimum value.

    Example:

    .. testcode::

      import flatland
      from flatland.validation import ValueAtLeast

      schema = flatland.Integer('wishes', validators=[ValueAtLeast(minimum=3)])

    **Attributes**

    .. attribute:: minimum

      Any comparable object.

    **Messages**

    .. attribute:: failure

      Emitted if the value is less than :attr:`minimum`.

     N/A failure N/A N_ %(label)s must be greater than or equal to %(minimum)s. __init__ N/A N/A self minimum N/A kw N/A N/A N/A N/A Validator __init__ self kw N/A N/A self minimum minimum N/A validate N/A N/A self element state N/A N/A N/A N/A N/A N/A element value N/A self minimum N/A N/A N/A N/A self note_error element state failure N/A True N/A N/A ValueBetween N/A Validator N/A N/A A validator that enforces minimum and maximum values.

    Example:

    .. testcode::

      import flatland
      from flatland.validation import ValueBetween

      schema = flatland.Integer('wishes',
                               validators=[ValueBetween(minimum=1, maximum=3)])

    **Attributes**

    .. attribute:: minimum

      Any comparable object.

    .. attribute:: maximum

      Any comparable object.

    .. attribute:: inclusive

      Boolean value indicating that :attr:`minimum` and :attr:`maximum` are
      included in the range.  Defaults to True.

    **Messages**

    .. attribute:: failure_inclusive

      Emitted when :attr:`inclusive` is True if the expression
      :attr:`minimum` <= value <= :attr:`maximum`
      evaluates to False.

    .. attribute:: failure_exclusive

      Emitted when :attr:`inclusive` is False if the expression
      :attr:`minimum` < value < :attr:`maximum`
      evaluates to False.

     N/A failure_inclusive N/A N_ %(label)s must be in the range %(minimum)s to %(maximum)s. N/A failure_exclusive N/A N_ %(label)s must be greater than %(minimum)s and less than %(maximum)s. N/A inclusive True __init__ N/A N/A self minimum maximum N/A kw N/A N/A N/A N/A Validator __init__ self kw N/A N/A self minimum minimum N/A N/A self maximum maximum N/A validate N/A N/A self element state N/A N/A N/A N/A self inclusive N/A N/A N/A N/A N/A self minimum N/A element value N/A self maximum N/A N/A N/A N/A self note_error element state failure_inclusive N/A N/A N/A N/A N/A self minimum N/A element value N/A self maximum N/A N/A N/A N/A self note_error element state failure_exclusive N/A True N/A N/A MapEqual N/A Validator N/A N/A A general field equality validator.

    Validates that two or more fields are equal.

    **Attributes**

    .. attribute:: field_paths

      A sequence of field names or field paths.  Path names will be
      evaluated at validation time and relative path names are
      resolved relative to the element holding this validator.  See
      :class:`ValuesEqual` for an example.

    .. attribute:: transform

      A 1-arg callable, passed a
      :class:`~flatland.schema.base.Element`, returning a value for
      equality testing.

    **Messages**

    .. attribute:: unequal

      Emitted if the ``transform(element)`` of all elements are not
      equal.  ``labels`` will substitute to a comma-separated list of
      the :attr:`~flatland.schema.base.Element.label` of all but the
      last element; ``last_label`` is the label of the last.

     N/A unequal N/A N_ %(labels)s and %(last_label)s do not match. N/A field_paths N/A N/A transform N/A N/A N/A el N/A el __init__ N/A N/A self N/A field_paths kw N/A N/A Construct a MapEqual.

        :param \*field_paths: a sequence of 2 or more elements names or paths.

        :param \*\*kw: passed to :meth:`Validator.__init__`.

         N/A N/A field_paths N/A N/A N/A self field_paths at least 2 element paths required. N/A N/A N/A N/A len field_paths 1 at least 2 element paths required. N/A N/A self field_paths field_paths N/A N/A N/A Validator __init__ self kw N/A validate N/A N/A self element state N/A N/A N/A elements N/A N/A N/A element el name N/A name N/A self field_paths N/A fn N/A self transform N/A sample N/A fn N/A elements N/A 0 N/A N/A all N/A N/A N/A fn el sample N/A el N/A elements N/A 1 N/A N/A True N/A labels N/A N/A ,  join N/A N/A el label N/A el N/A elements N/A -1 N/A last_label N/A N/A elements N/A -1 label N/A N/A N/A self note_error element state unequal labels labels last_label last_label N/A N/A ValuesEqual N/A MapEqual N/A N/A Validates that the values of multiple elements are equal.

    A :class:`MapEqual` that compares the
    :attr:`~flatland.schema.base.Element.value` of each element.

    Example:

    .. testcode::

      import flatland
      from flatland.validation import ValuesEqual

      class MyForm(flatland.Form):
          schema = [ String('password'), String('password_again') ]
          validators = ValuesEqual('password', 'password_again')

    .. attribute:: transform()

      attrgettr('value')

     N/A transform N/A attrgetter value N/A UnisEqual N/A MapEqual N/A N/A Validates that the Unicode values of multiple elements are equal.

    A :class:`MapEqual` that compares the
    :attr:`~flatland.schema.base.Element.u` of each element.

    .. attribute:: transform

      attrgettr('u')

     N/A transform N/A attrgetter u N/A