Schema-driven validation for your entire stack.

Protovalidate is the semantic validation library for Protobuf. With standard annotations for common rules and CEL support for custom logic, you'll know every component in your stack is enforcing exactly the same constraints.

user.proto
syntax = "proto3";

package acme.user.v1;

import "buf/validate/validate.proto";

message User {
  string id = 1 [(buf.validate.field).string.uuid = true];
  uint32 age = 2 [(buf.validate.field).uint32.lte = 150]; // We can only hope.
  string email = 3 [(buf.validate.field).string.email = true];
  string first_name = 4 [(buf.validate.field).string.max_len = 64];
  string last_name = 5 [(buf.validate.field).string.max_len = 64];

  option (buf.validate.message).cel = {
    id: "first_name_requires_last_name"
    message: "last_name must be present if first_name is present"
    expression: "!has(this.first_name) || has(this.last_name)"
  };
}
Start validating →
rocket_launch

Get started in minutes

Add a dependency, annotate your schemas, and get bulletproof validation in under 10 minutes.

Get started
flash_on

Easy integration

Plug validation interceptors into your Connect/gRPC services or enable broker-side enforcement in Bufstream.

code

Try it online

Test validation rules, debug CEL expressions, and share code snippets with your team.

Launch playground