# 11. Validation Library Selection * Status: Accepted * Deciders: Gabriel Radureau, AI Agent * Date: 2026-04-05 * Implementation Date: 2026-04-05 ## Context and Problem Statement The dance-lessons-coach application needs input validation for API request bodies and configuration values. We need a library that integrates well with Go structs and provides clear error messages. ## Decision Drivers * Struct-tag-based validation to avoid boilerplate * Good error messages with field-level detail * Active maintenance and wide adoption * Compatibility with existing interface-based design ## Considered Options * `github.com/go-playground/validator/v10` — struct-tag driven, widely adopted * `github.com/asaskevich/govalidator` — tag-based but less expressive * Manual validation — full control, no dependency, high boilerplate ## Decision Outcome Chosen option: **`go-playground/validator/v10`** because it is the de-facto standard in the Go ecosystem, supports struct-tag annotations, provides field-level error detail, and integrates cleanly with our interface-based design. ## Implementation `github.com/go-playground/validator/v10 v10.30.2` is present in `go.mod`. The `pkg/validation/` package wraps the validator for reuse across handlers. ## Links * [go-playground/validator GitHub](https://github.com/go-playground/validator)