---
title: validate_literals (latest version)
description: API reference for samplomatic.utils.validate_literals in the latest version of samplomatic
source: https://quantum.cloud.ibm.com/docs/en/api/samplomatic/auto/utils-validate-literals
---

# validate\_literals

`samplomatic.utils.validate_literals(*arg_names: str) → Callable`

[GitHub](https://github.com/Qiskit/samplomatic/tree/main/samplomatic/utils/validate_literals.py#L21-L75)

Return a decorator to validate function arguments against literal type annotations.

**Parameters**

**\*arg\_names** – The arguments to validate the values of against their `Literal` type annotations.

**Returns**

A decorator that wraps a function in a validation routine.
