def validate_entities(self, model, context=None):
result = Result()<EOL>for property_name in self.entities:<EOL><INDENT>prop = self.entities[property_name]<EOL>value = self.get(model, property_name)<EOL>errors = prop.validate(<EOL>value=value,<EOL>model=model,<EOL>context=context<EOL>)<EOL>if len(errors):<EOL><INDENT>result.add_entity_errors(<EOL>property_name=property_name,<EOL>direct_errors=errors<EOL>)<EOL><DEDENT>if value is None:<EOL><INDENT>continue<EOL><DEDENT>schema_valid = prop.validate_with_schema(<EOL>model=value,<EOL>context=context<EOL>)<EOL>if schema_valid == False:<EOL><INDENT>result.add_entity_errors(<EOL>property_name,<EOL>schema_errors=schema_valid.errors<EOL>)<EOL><DEDENT><DEDENT>return result<EOL>
Validate entity properties
Performs validation on entity properties to return a result object.
:param model:  object or dict
:param context: object, dict or None
:return: shiftschema.result.Result