def validate_parameter_literals(func: Callable):
    """Decorator to check that the arguments passed to a function
    correspond to the correct function parameter if it (the parameter)
    is a literal type.

    Args:
        func: The function to validate.

    Returns:
        The wrapper function.
    """
    console.deprecate(
        "validate_parameter_literals",
        reason="Use manual validation instead.",
        deprecation_version="0.7.11",
        removal_version="0.8.0",
        dedupe=True,
    )

    func_params = list(inspect.signature(func).parameters.items())
    annotations = {param[0]: param[1].annotation for param in func_params}

    @wraps(func)
    def wrapper(*args, **kwargs):
        # validate args
        for param, arg in zip(annotations, args, strict=False):
            if annotations[param] is inspect.Parameter.empty:
                continue
            validate_literal(param, arg, annotations[param], func.__name__)

        # validate kwargs.
        for key, value in kwargs.items():
            annotation = annotations.get(key)
            if not annotation or annotation is inspect.Parameter.empty:
                continue
            validate_literal(key, value, annotation, func.__name__)
        return func(*args, **kwargs)

    return wrapper
Decorator to check that the arguments passed to a function
    correspond to the correct function parameter if it (the parameter)
    is a literal type.

    Args:
        func: The function to validate.

    Returns:
        The wrapper function.
    
reflex/utils/types.py