def validate_properties(self, properties, category=None, status=None):
        """
        Validates the properties and adds error messages to self._errors

        Parameter
        ---------
        properties : dict
            Contribution properties
        category : geokey.categories.models.Category
            Category the properties are validated against
        status : str
            Status for the contribution
        """
        errors = []

        if self.instance:
            status = status or self.instance.status
            if self.instance.properties:
                update = self.instance.properties.copy()
                update.update(properties)
                properties = update
        else:
            status = status or category.default_status

        properties = self.replace_null(properties)
        try:
            if status == 'draft':
                Observation.validate_partial(category, properties)
            else:
                Observation.validate_full(category, properties)
        except __HOLE__, e:
            errors.append(e)

        self._validated_data['properties'] = properties
        self._validated_data['meta']['status'] = status

        if errors:
            self._errors['properties'] = errors
dataset/ETHPy150Open ExCiteS/geokey/geokey/contributions/serializers.py/ContributionSerializer.validate_properties