# `LangExtract.Prompt.Validator`
[🔗](https://github.com/mdepolli/lang_extract/blob/v0.10.0/lib/lang_extract/prompt/validator.ex#L1)

Validates that few-shot examples in a `LangExtract.Template` are self-consistent.

Each extraction text should align exactly against its own example's source text.
Catches typos, hallucinated spans, and copy-paste errors before they reach the LLM.

Deliberately uses the production `Alignment.Aligner`, so a passing validation
predicts how the same extractions align at runtime.

The validator is a pure function — it reports what it finds. The caller decides
what to do with the results (log, raise, ignore).

# `validate`

```elixir
@spec validate(
  LangExtract.Template.t(),
  keyword()
) :: :ok | {:error, [LangExtract.Prompt.Validator.Issue.t()]}
```

# `validate!`

```elixir
@spec validate!(
  LangExtract.Template.t(),
  keyword()
) :: :ok
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
