# mwitkow/go-proto-validators

Generate message validators from .proto annotations.

Repository: https://github.com/mwitkow/go-proto-validators
Canonical: https://ross.abutalabs.com/products/go-proto-validators
Language: Go
License: Apache-2.0
License Family: permissive
Topics: protobuf, protocol-buffers, go, golang, validation, proto
Last push: 2023-10-25T03:15:36+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3811, "days_push": 1043, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1101, forks 163 (observed 2026-08-28T04:03:35.517413+00:00)

## What it is
A protoc plugin that generates Validate() error methods on Go protobuf structs from field validation options declared in .proto files. Validation logic is code-generated, avoiding reflection overhead on deeply nested messages.

## Use cases
- validate protobuf messages in Go
- generate validation code from proto files
- enforce field constraints in protobuf schemas
- replace manual if-nil checks for proto3 messages
- add regex and range validation to gRPC request messages

## When to avoid
- you need actively maintained protobuf validation (consider protovalidate/PGV)
- you don't use Go or protobuf
- you need runtime-configurable validation rules

## Facets
- artifact type: library
- maturity: maintenance
- function: serialization, parser, developer-tools
- domain: developer-tools, apis, backend
- platform: go, cli
- tags: protobuf, protoc-plugin, code-generation, validation, grpc

## Member repositories
- mwitkow/go-proto-validators (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:35.517413+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:45:43.192654+00:00, confidence not recorded.
  - readme: https://github.com/mwitkow/go-proto-validators (fetched 2026-08-28T04:03:35.517413+00:00, sha c6334d61af9d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
