def validate(self, value, model_instance):
        """
        Validates a coerced value (ie, passed through to_python) and throws a
        ValidationError if invalid.
        """
        if self.required and self.empty(value):
            raise ValidationError('required', self)

        if self.id and any(c in value for c in INVALID_PATH_CHARS):
            raise ValidationError('invalid_path', self)
dataset/ETHPy150Open bendavis78/python-gitmodel/gitmodel/fields.py/Field.validate/original