# check_valid_template

> **Function** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/prompts/string/check_valid_template)

Check that template string is valid.

## Signature

```python
check_valid_template(
    template: str,
    template_format: str,
    input_variables: list[str],
) -> None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `template` | `str` | Yes | The template string. |
| `template_format` | `str` | Yes | The template format.  Should be one of `'f-string'` or `'jinja2'`. |
| `input_variables` | `list[str]` | Yes | The input variables. |

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/51e954877efd2d2c3c5bf09364dcfec8794eadb0/libs/core/langchain_core/prompts/string.py#L262)