# govalidator

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


Source: https://findsoftware.frbit.cloud/govalidator/
Last reviewed: 2026-11-09
Listed since: 2026-11-09

## Record

### Links

- home: https://asaskevich.dev/projects/govalidator/
- repository: https://github.com/asaskevich/govalidator
- docs: https://godoc.org/github.com/asaskevich/govalidator

### Identity

- status: active
- maintainer: Aliaksei (Alex) Saskevich
- maintainerType: individual
- parent: unknown
- firstRelease: 2014
- hqCountry: unknown

### Kind

- category: library
- hosting: binary
- language: go
- runtime: binary
- runtimeMin: unknown
- basedOn: unknown

### Content

- contentStore: not applicable
- databases: not applicable
- adminUi: not applicable
- headlessApi: not applicable
- templating: not applicable
- i18n: not applicable

### Rendering and deploy

- runsAs: not applicable
- renderingModes: not applicable
- installMethod: go get

### License

- licenseModel: open-source
- license: MIT

### Releases

- currentMajor: 12
- latestReleaseDate: 2026-04-14

### Adoption

- githubStargazers: 6201
- packagistDownloads: not applicable
- npmWeeklyDownloads: not applicable
- contributors: 91
- pluginCount: unknown
- packagistMonthlyDownloads: unknown
- ecosystemsMonthlyDownloads: unknown
- httpArchiveSites: unknown
- wordpressActiveInstalls: unknown
- dependentRepos: unknown
- dependentPackages: unknown

### Sources

- urls: https://api.github.com/repos/asaskevich/govalidator (read 2026-11-09)
- urls: https://asaskevich.dev/projects/govalidator/ (read 2026-11-09)
- urls: https://raw.githubusercontent.com/asaskevich/govalidator/master/README.md (read 2026-11-09)
- language: https://api.github.com/repos/asaskevich/govalidator (read 2026-11-09)
- category: https://raw.githubusercontent.com/asaskevich/govalidator/master/README.md (read 2026-11-09)
- runtime: https://raw.githubusercontent.com/asaskevich/govalidator/master/README.md (read 2026-11-09)
- installMethod: https://raw.githubusercontent.com/asaskevich/govalidator/master/README.md (read 2026-11-09)
- installMethod: https://raw.githubusercontent.com/asaskevich/govalidator/master/README.md (read 2026-11-09)
- license: https://api.github.com/repos/asaskevich/govalidator (read 2026-11-09)
- licenseModel: https://raw.githubusercontent.com/asaskevich/govalidator/master/LICENSE (read 2026-11-09)
- maintainer: https://raw.githubusercontent.com/asaskevich/govalidator/master/LICENSE (read 2026-11-09)
- firstRelease: https://api.github.com/repos/asaskevich/govalidator/commits/6fa0de0bdbbf76d3460145dc92622df8ecdc2f41 (read 2026-11-09)
- currentMajor: https://proxy.golang.org/github.com/asaskevich/govalidator/v12/@v/v12.0.0.info (read 2026-11-09)
- latestReleaseDate: https://proxy.golang.org/github.com/asaskevich/govalidator/v12/@v/v12.0.0.info (read 2026-11-09)
- githubStargazers: https://api.github.com/repos/asaskevich/govalidator (read 2026-11-09)
- contributors: https://api.github.com/repos/asaskevich/govalidator/contributors?per_page=1 (read 2026-11-09)

## Notes

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.

---

Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attributes are recorded, never scored; absent means unknown.
Credit, in full: FindSoftware, CC BY 4.0
