> For the complete documentation index, see [llms.txt](https://alexisvisco.gitbook.io/kcd/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alexisvisco.gitbook.io/kcd/hooks-and-extractors/validate-hook.md).

# Validate hook

The validate hook is the hook called to validate your input after it has been parsed. The default expected error for a validation error by the error hook is a `map[string]error` . By default the hook use [ozzo-validation](https://github.com/go-ozzo/ozzo-validation).

A validate hook must have this signature:

```go
type ValidateHook func(ctx context.Context, input interface{}) error
```

{% hint style="info" %}
Check out the default [validate hook implementation here](https://github.com/expectedsh/kcd/blob/master/pkg/hook/validate.go).

Check out the signature of the [validate hook](https://github.com/expectedsh/kcd/blob/master/pkg/hook/hooks.go#L27).
{% endhint %}
