# Path: gae/cerberus/cerberus.py
# @property
# def errors(self):
#     """
#     :rtype: a list of validation errors. Will be empty if no errors
#             were found during. Resets after each call to :func:`validate`.
#     """
#     return self._errors


import sys
import re
import copy
from datetime import datetime
from collections import Iterable, Mapping, Sequence
from . import errors
                validator = self.__get_child_validator()
                validator.validate(
                    {key: document}, {key: schema}, context=self.document)
                if len(validator.errors):
                    self._error(field, validator.errors)

    def _validate_propertyschema(self, schema, field, value):
        if isinstance(value, Mapping):
            validator = self.__get_child_validator(
                schema={field: {'type': 'list', 'schema': schema}})
            validator.validate({field: list(value.keys())},
                               context=self.document)
            for error in validator.errors:
                self._error(field, error)

    def _validate_items(self, items, field, value):
        if isinstance(items, Mapping):
            self._validate_items_schema(items, field, value)
        elif isinstance(items, Sequence):
            self._validate_items_list(items, field, value)

    def _validate_items_list(self, schema, field, values):
        if len(schema) != len(values):
            self._error(field, errors.ERROR_ITEMS_LIST.format(len(schema)))
        else:
            for i in range(len(schema)):
                validator = self.__get_child_validator(schema={i: schema[i]})
                validator.validate({i: values[i]}, context=self.document)
                for error in validator.errors:
                    self.errors.setdefault(field, {})

# Path: gae/cerberus/cerberus.py
# @property
# def errors(self):
#     """
#     :rtype: a list of validation errors. Will be empty if no errors
#             were found during. Resets after each call to :func:`validate`.
#     """
#     return self._errors


# Path: gae/cerberus/cerberus.py
import sys
import re
import copy
from datetime import datetime
from collections import Iterable, Mapping, Sequence
from . import errors

                validator = self.__get_child_validator()
                validator.validate(
                    {key: document}, {key: schema}, context=self.document)
                if len(validator.errors):
                    self._error(field, validator.errors)

    def _validate_propertyschema(self, schema, field, value):
        if isinstance(value, Mapping):
            validator = self.__get_child_validator(
                schema={field: {'type': 'list', 'schema': schema}})
            validator.validate({field: list(value.keys())},
                               context=self.document)
            for error in validator.errors:
                self._error(field, error)

    def _validate_items(self, items, field, value):
        if isinstance(items, Mapping):
            self._validate_items_schema(items, field, value)
        elif isinstance(items, Sequence):
            self._validate_items_list(items, field, value)

    def _validate_items_list(self, schema, field, values):
        if len(schema) != len(values):
            self._error(field, errors.ERROR_ITEMS_LIST.format(len(schema)))
        else:
            for i in range(len(schema)):
                validator = self.__get_child_validator(schema={i: schema[i]})
                validator.validate({i: values[i]}, context=self.document)
                for error in validator.errors:
                    self.errors.setdefault(field, {})

                    self.errors[field].update(validator.errors)