def METHOD_NAME(self, data):
    if data["type"] == "subca":
        if not data.get("parent"):
            raise ValidationError(
                "If generating a subca, parent 'authority' must be specified."
            )