App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | List of all members
google.appengine.api.validation.Repeated Class Reference
Inheritance diagram for google.appengine.api.validation.Repeated:
google.appengine.api.validation.Validator

Public Member Functions

def __init__
 
def Validate
 
- Public Member Functions inherited from google.appengine.api.validation.Validator
def __init__
 
def __call__
 
def Validate
 
def ToValue
 

Public Attributes

 constructor
 
 expected_type
 
- Public Attributes inherited from google.appengine.api.validation.Validator
 default
 

Additional Inherited Members

- Static Public Attributes inherited from google.appengine.api.validation.Validator
 expected_type = object
 

Detailed Description

Repeated field validator.

Indicates that attribute is expected to be a repeated value, ie,
a sequence.  This adds additional validation over just Type(list)
in that it retains information about what can be stored in the list by
use of its constructor field.

Constructor & Destructor Documentation

def google.appengine.api.validation.Repeated.__init__ (   self,
  constructor,
  default = None 
)
Initializer for repeated field.

Args:
  constructor: Type used for verifying elements of sequence attribute.

Member Function Documentation

def google.appengine.api.validation.Repeated.Validate (   self,
  value,
  key 
)
Do validation of sequence.

Value must be a list and all elements must be of type 'constructor'.

Args:
  value: Value to validate.
  key: Name of the field being validated.

Raises:
  ValidationError: if value is None, not a list or one of its elements is
the wrong type.

The documentation for this class was generated from the following file: