# validator

> Struct and field validation for Go, based on tags

Source: https://talira.ai/catalog/validator-dhqk5wjg
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / validation / schema](https://talira.ai/categories/libraries/validation/schema)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [go-playground](https://talira.ai/orgs/go-playground.md)

validator (go-playground/validator) validates Go structs and individual fields from struct tags. It handles cross-field and cross-struct checks, dives into slices, arrays and maps (keys and values), resolves interfaces and custom types such as SQL driver Valuers, supports alias tags and custom validators, reports the JSON field name in its errors and has translatable error messages. It's the default validator of the [Gin](https://talira.ai/catalog/gin-zd6z62pc.md) web framework. MIT licensed.

## Links

- GitHub: https://github.com/go-playground/validator
- Docs: https://pkg.go.dev/github.com/go-playground/validator/v10

## Problems it solves

- validate incoming request structs in my Go API
- check required fields and formats on a Go struct without writing if statements
- validate nested slices and maps in Go

## Features

- Validation rules from struct tags
- Cross-field and cross-struct validation
- Dives into slices, arrays and maps, keys and values
- Custom validators and alias tags
- Custom field types such as SQL driver Valuers
- JSON field names in errors
- Translatable error messages
- Default validator in Gin

## Trust

Overall: 0.66 out of 1.
Signals: maintenance 0.81, adoption 0.86, momentum 0.65, community 0.99, backing 0.30, extensibility 0.00.

- last commit 5 days ago
- 31 commits in the last 90 days
- latest release v10.30.6 27 days ago
- 20.2k GitHub stars
- 301 contributors
- backed by go-playground

## Related

- Works with [Gin](https://talira.ai/catalog/gin-zd6z62pc.md)

## Alternatives

- [govalidator](https://talira.ai/catalog/govalidator-hz8wgjw7.md): Validators and sanitizers for strings, structs and collections in Go

## Sources

[^1]: https://github.com/go-playground/validator/blob/master/LICENSE (checked 27 Nov 2026)
