# gookit/validate

⚔ Go package for data validation and filtering. support Map, Struct, Form data. Go通用的数据验证与过滤库，使用简单，内置大部分常用验证、过滤器，支持自定义验证器、自定义消息、字段翻译。

Repository: https://github.com/gookit/validate
Canonical: https://ross.abutalabs.com/products/validate
Homepage: https://gookit.github.io/validate/
Language: Go
License: MIT
License Family: permissive
Topics: validation, validator, filter, govalidator, validate, verification
Last push: 2026-08-18T12:20:28+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 86, longevity 100
- inputs: {"age_days": 2970, "days_push": 15, "days_rel": 15, "gap_med": 65.5, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1164, forks 123 (observed 2026-08-28T04:03:49.820907+00:00)

## What it is
A generic Go library for data validation and filtering that supports validating Map, Struct, and HTTP Request (Form, JSON, url.Values) data. It includes 70+ built-in validators, data filters/converters, scene-based validation, custom validators, and i18n-aware error messages.

## Use cases
- validate form data in a go web app
- validate json request body in gin or echo
- sanitize and convert input before validation
- validate struct fields with tags
- custom error messages and field translations for validation
- validate different fields per scene
- validate individual values against rule strings

## When to choose
- you need a batteries-included Go validation library with many built-in validators and filters
- you want automatic validation of http.Request data based on Content-Type
- you need i18n error messages or per-field translations
- you want framework-agnostic validation usable with Gin, Echo, Chi, etc.

## When to avoid
- you only need simple struct-tag validation and prefer a minimal dependency-free approach
- your framework already provides a validation layer you must use
- you need validation in a non-Go language

## Facets
- artifact type: library
- maturity: active
- function: form-handling, serialization
- domain: backend, web-development, developer-tools
- platform: go, cross-platform
- tags: validation, data-filtering, sanitization, struct-tags, i18n, http-request-validation

## Member repositories
- gookit/validate (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:49.820907+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-30T06:29:40.342860+00:00, confidence not recorded.
  - readme: https://github.com/gookit/validate (fetched 2026-08-28T04:03:49.820907+00:00, sha 071ab18a7ddb)
  - homepage: https://gookit.github.io/validate/ (fetched 2026-08-29T12:35:27.640648+00:00, sha d302d52ae043)
- Data as of 2026-08-30T08:39:29.467469+00:00.
