# go-playground/validator

:100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving

Repository: https://github.com/go-playground/validator
Canonical: https://ross.abutalabs.com/products/validator
Language: Go
License: MIT
License Family: permissive
Topics: validation, translation, error-handling
Last push: 2026-08-26T16:35:03+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 74, longevity 100
- inputs: {"age_days": 4220, "days_push": 7, "days_rel": 96, "gap_med": 59, "n_releases_24m": 12}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 20132, forks 1449 (observed 2026-08-28T04:11:29.722986+00:00)

## What it is
A Go library for validating structs and individual fields using struct tags, with support for cross-field, cross-struct, and nested map/slice/array validation. It is the default validator for the Gin web framework and supports customizable i18n-aware error messages.

## Use cases
- validate request payloads in a Go web API
- validate struct fields with tags in Go
- validate nested slices and maps in Go structs
- add cross-field validation rules to Go structs
- generate localized validation error messages
- validate JSON field names in error output

## When to choose
- you need tag-based struct and field validation in Go
- you use Gin and want its default validator
- you need to validate deeply nested data structures
- you need i18n-aware validation error messages

## When to avoid
- you need schema validation for raw JSON/YAML documents rather than Go structs
- you want a standalone validation service or CLI
- your project is not written in Go

## Facets
- artifact type: library
- maturity: stable
- function: testing, error-handling, middleware
- domain: developer-tools, backend, web-development
- platform: go, cross-platform
- tags: struct-validation, validation-tags, i18n, gin, field-validation

## Member repositories
- go-playground/validator (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:29.722986+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:59:20.578173+00:00, confidence not recorded.
  - readme: https://github.com/go-playground/validator (fetched 2026-08-28T04:11:29.722986+00:00, sha 77e61f61039c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
