def _validate_model(cls, data, partial_data, context):
    errors = {}
    invalid_fields = []
    for field_name, field in iteritems(cls._fields):
        if field_name in cls._validator_functions and field_name in partial_data:
            value = data[field_name]
            try:
                cls._validator_functions[field_name](cls, partial_data, value, context)
            except FieldError as exc:
                field = cls._fields[field_name]
                serialized_field_name = field.serialized_name or field_name
                errors[serialized_field_name] = exc.messages
                invalid_fields.append(field_name)

    for field_name in invalid_fields:
        data.pop(field_name)
        partial_data.pop(field_name)

    return errors
Validate data using model level methods.
dataset/ETHPy150Open schematics/schematics/schematics/validate.py/_validate_model