package buf.validate

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

message AnyRules

validate.proto:4414

AnyRules describe rules applied exclusively to the `google.protobuf.Any` well-known type.

Used in: FieldRules

message BoolRules

validate.proto:3030

BoolRules describes the rules applied to `bool` values. These rules may also be applied to the `google.protobuf.BoolValue` Well-Known-Type.

Used in: FieldRules

message BytesRules

validate.proto:3861

BytesRules describe the rules applied to `bytes` values. These rules may also be applied to the `google.protobuf.BytesValue` Well-Known-Type.

Used in: FieldRules

message DoubleRules

validate.proto:666

DoubleRules describes the rules applied to `double` values. These rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type.

Used in: FieldRules

message DurationRules

validate.proto:4443

DurationRules describe the rules applied exclusively to the `google.protobuf.Duration` well-known type.

Used in: FieldRules

message EnumRules

validate.proto:4138

EnumRules describe the rules applied to `enum` values.

Used in: FieldRules

message FieldMaskRules

validate.proto:4659

FieldMaskRules describe rules applied exclusively to the `google.protobuf.FieldMask` well-known type.

Used in: FieldRules

message FieldPath

validate.proto:5085

`FieldPath` provides a path to a nested protobuf field. This message provides enough information to render a dotted field path even without protobuf descriptors. It also provides enough information to resolve a nested field through unknown wire data.

Used in: Violation

message FieldPathElement

validate.proto:5095

`FieldPathElement` provides enough information to nest through a single protobuf field. If the selected field is a map or repeated field, the `subscript` value selects a specific element from it. A path that refers to a value nested under a map key or repeated field index will have a `subscript` value. The `field_type` field allows unambiguous resolution of a field even if descriptors are not available.

Used in: FieldPath

message FieldRules

validate.proto:204

FieldRules encapsulates the rules for each type of field. Depending on the field, the correct set should be used to ensure proper validations.

Used in: MapRules, RepeatedRules

message Fixed32Rules

validate.proto:2173

Fixed32Rules describes the rules applied to `fixed32` values.

Used in: FieldRules

message Fixed64Rules

validate.proto:2387

Fixed64Rules describes the rules applied to `fixed64` values.

Used in: FieldRules

message FloatRules

validate.proto:442

FloatRules describes the rules applied to `float` values. These rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type.

Used in: FieldRules

enum Ignore

validate.proto:350

Specifies how `FieldRules.ignore` behaves, depending on the field's value, and whether the field tracks presence.

Used in: FieldRules

message Int32Rules

validate.proto:887

Int32Rules describes the rules applied to `int32` values. These rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type.

Used in: FieldRules

message Int64Rules

validate.proto:1102

Int64Rules describes the rules applied to `int64` values. These rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type.

Used in: FieldRules

enum KnownRegex

validate.proto:3849

KnownRegex contains some well-known patterns.

Used in: StringRules

message MapRules

validate.proto:4336

MapRules describe the rules applied to `map` values.

Used in: FieldRules

message MessageOneofRule

validate.proto:171

Used in: MessageRules

message MessageRules

validate.proto:112

MessageRules represents validation rules that are applied to the entire message. It includes disabling options and a list of Rule messages representing Common Expression Language (CEL) validation rules.

message OneofRules

validate.proto:182

The `OneofRules` message type enables you to manage rules for oneof fields in your protobuf messages.

message PredefinedRules

validate.proto:327

PredefinedRules are custom rules that can be re-used with multiple fields.

message RepeatedRules

validate.proto:4253

RepeatedRules describe the rules applied to `repeated` values.

Used in: FieldRules

message Rule

validate.proto:92

`Rule` represents a validation rule written in the Common Expression Language (CEL) syntax. Each Rule includes a unique identifier, an optional error message, and the CEL expression to evaluate. For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). ```proto message Foo { option (buf.validate.message).cel = { id: "foo.bar" message: "bar must be greater than 0" expression: "this.bar > 0" }; int32 bar = 1; } ```

Used in: FieldRules, MessageRules, PredefinedRules

message SFixed32Rules

validate.proto:2601

SFixed32Rules describes the rules applied to `fixed32` values.

Used in: FieldRules

message SFixed64Rules

validate.proto:2815

SFixed64Rules describes the rules applied to `fixed64` values.

Used in: FieldRules

message SInt32Rules

validate.proto:1745

SInt32Rules describes the rules applied to `sint32` values.

Used in: FieldRules

message SInt64Rules

validate.proto:1959

SInt64Rules describes the rules applied to `sint64` values.

Used in: FieldRules

message StringRules

validate.proto:3077

StringRules describes the rules applied to `string` values These rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type.

Used in: FieldRules

message TimestampRules

validate.proto:4746

TimestampRules describe the rules applied exclusively to the `google.protobuf.Timestamp` well-known type.

Used in: FieldRules

message UInt32Rules

validate.proto:1317

UInt32Rules describes the rules applied to `uint32` values. These rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type.

Used in: FieldRules

message UInt64Rules

validate.proto:1532

UInt64Rules describes the rules applied to `uint64` values. These rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type.

Used in: FieldRules

message Violation

validate.proto:5014

`Violation` represents a single instance where a validation rule, expressed as a `Rule`, was not met. It provides information about the field that caused the violation, the specific rule that wasn't fulfilled, and a human-readable error message. For example, consider the following message: ```proto message User { int32 age = 1 [(buf.validate.field).cel = { id: "user.age", expression: "this < 18 ? 'User must be at least 18 years old' : ''", }]; } ``` It could produce the following violation: ```json { "ruleId": "user.age", "message": "User must be at least 18 years old", "field": { "elements": [ { "fieldNumber": 1, "fieldName": "age", "fieldType": "TYPE_INT32" } ] }, "rule": { "elements": [ { "fieldNumber": 23, "fieldName": "cel", "fieldType": "TYPE_MESSAGE", "index": "0" } ] } } ```

Used in: Violations

message Violations

validate.proto:4966

`Violations` is a collection of `Violation` messages. This message type is returned by Protovalidate when a proto message fails to meet the requirements set by the `Rule` validation rules. Each individual violation is represented by a `Violation` message.