FindSoftware

govalidator

Go package of validators and sanitizers for strings, structs and collections.

govalidator is a Go package with validators and sanitizers for strings, structs and collections. Struct fields are checked through valid struct tags, where each validator name in a tag maps to a function, and the same checks are available as plain functions for values outside a struct.

The README says the package is based on validator.js, the JavaScript validation library. Custom validators can be added to the tag map, and a struct can be required to tag every field.

Worth knowing

The README’s breaking-changes section says custom validator functions take a context as second parameter, and that custom validators are added through a method rather than by writing to the map, to prevent data races.

Identity

Status
Active
Maintainer
Aliaksei (Alex) Saskevich4
Maintained by
Individual
First release
20145

Rendering and deploy

Install with
go get3

Releases

Current major version
126
Last release
2026-04-146

Adoption

GitHub stars
6,2011
Contributors
917

Why these figures do not compare

Sources

  1. 2026-11-09: links, Written in, License, GitHub stars
    api.github.com/repos/asaskevich/govalidator
  2. 2026-11-09: links
    asaskevich.dev/projects/govalidator/
  3. 2026-11-09: links, Categories, Runtime, Install with
    raw.githubusercontent.com/asaskevich/govalidator/master/README.md
  4. 2026-11-09: License model, Maintainer
    raw.githubusercontent.com/asaskevich/govalidator/master/LICENSE
  5. 2026-11-09: First release
    api.github.com/repos/asaskevich/govalidator/commits/6fa0de0bdbbf76d3460145dc92622df8ecdc2f41
  6. 2026-11-09: Current major version, Last release
    proxy.golang.org/github.com/asaskevich/govalidator/v12/@v/v12.0.0.info
  7. 2026-11-09: Contributors
    api.github.com/repos/asaskevich/govalidator/contributors?per_page=1

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON