# govalidator

> Validators and sanitizers for strings, structs and collections in Go

Source: https://talira.ai/catalog/govalidator-hz8wgjw7
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / validation / values](https://talira.ai/categories/libraries/validation/values), [languages / go](https://talira.ai/categories/languages/go)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (MIT).
- Free tier: yes[^1]
- Backed by: [Aliaksei Saskevich](https://talira.ai/orgs/aliaksei-saskevich.md)

govalidator is a Go package of validators and sanitizers for strings, numbers, slices, maps and structs, based on [validator.js](https://talira.ai/catalog/validator-js-8jwvky98.md). It has functions such as IsEmail, IsURL and IsIP, struct validation driven by `valid` tags (with ValidateStruct and ValidateMap), sanitizers like WhiteList and ToString, helpers that map and filter slices, and custom validators registered by tag name.

## Links

- Website: https://asaskevich.dev/projects/govalidator/
- GitHub: https://github.com/asaskevich/govalidator
- Docs: https://pkg.go.dev/github.com/asaskevich/govalidator

## Problems it solves

- check that a string in my Go service is a valid email address, URL or IP
- validate a Go struct's fields from tags before saving it
- sanitize user input strings in Go without writing my own regexes

## Features

- string validators such as IsEmail, IsURL and IsIP
- struct validation from valid tags
- map validation against a template
- sanitizers such as WhiteList and ToString
- custom validators registered by tag name

## Trust

Overall: 0.42 out of 1.
Signals: maintenance 0.27, adoption 0.76, momentum 0.49, community 0.83, backing 0.30, extensibility 0.00.

- latest release v11.0.1 5.7 years ago
- 6.2k GitHub stars
- 120 contributors
- backed by Aliaksei Saskevich

Warnings:

- last commit 7 months ago

## Alternatives

- [validator](https://talira.ai/catalog/validator-dhqk5wjg.md): Struct and field validation for Go, based on tags

## Sources

[^1]: https://github.com/asaskevich/govalidator/blob/master/LICENSE (checked 29 Nov 2026)
