def METHOD_NAME(cls, values: Dict[str, Any]) -> Dict[str, Any]:
    """
    Custom validation to ensure that local destination formats are valid.
    """
    restricted_destinations = [StorageType.local.value]
    storage_type = values.get("type")
    response_format = values.get("format")
    if (
        storage_type in restricted_destinations
        and response_format
        and response_format
        not in [ResponseFormat.json.value, ResponseFormat.html.value]
    ):
        raise ValueError(
            "Only JSON or HTML upload format are supported for local storage destinations."
        )
    return values