PredefinedRules are custom rules that can be re-used with multiple fields.
PredefinedRules are custom rules that can be re-used with multiple fields.
Optional[customReturns a safe value for JSON logs.
Returns a safe value for JSON logs.
Optional[unknownPreserves protobuf fields that this SDK version does not recognize.
Contains the fully qualified protobuf type name.
cel is a repeated field used to represent a textual expression
in the Common Expression Language (CEL) syntax. For more information,
see our documentation.
message MyMessage {
// The field `value` must be greater than 42.
optional int32 value = 1 [(buf.validate.predefined).cel = {
id: "my_message.value",
message: "value must be greater than 42",
expression: "this > 42",
}];
}
PredefinedRules are custom rules that can be re-used with multiple fields.