 3655ee98cb
			
		
	
	3655ee98cb
	
	
	
		
			
			exceptions now no longer have a ``parent`` attribute. Instead, they have a ``positional`` attribute, which signifies that the parent node type of the schema node to which they relate inherits from Positional. This attribute isn't an API; it's used only internally for reporting.
		
			
				
	
	
	
		
			2.5 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	Colander API
Exceptions
colander
Invalid
pos
An integer representing the position of this exception's schema node
relative to all other child nodes of this exception's parent schema
node. For example, if this exception is related to the third child node
of its parent's schema, pos might be the integer
3. pos may also be None, in which
case this exception is the root exception.
children
A list of child exceptions. Each element in this list (if any) will
also be an colander.Invalid exception, recursively, representing
the error circumstances for a particular schema deserialization.
msg
A str or unicode object, or a
translation string instance representing a freeform error value
set by a particular type during an unsuccessful deserialization. If this
exception is only structural (only exists to be a parent to some inner
child exception), this value will be None.
node
The schema node to which this exception relates.
value
An attribute not used internally by Colander, but which can be used
by higher-level systems to attach arbitrary values to Colander exception
nodes. For example, In the system named Deform, which uses Colander
schemas to define HTML form renderings, the value is used
when raising an exception from a widget as the value which should be
redisplayed when an error is shown.
Validators
All
Range
Length
OneOf
Function
Regex
Types
Mapping
Tuple
Sequence
Seq
String
Str
Integer
Int
Float
Decimal
Boolean
Bool
GlobalObject
DateTime
Date
Schema-Related
SchemaNode(typ,*nodes,name='',default=MISSING,validator=None,title='',description='')
Schema
MappingSchema
TupleSchema
SequenceSchema