BoolRules describes the rules applied to bool values. These rules
may also be applied to the google.protobuf.BoolValue Well-Known-Type.
BoolRules describes the rules applied to bool values. These rules
may also be applied to the google.protobuf.BoolValue Well-Known-Type.
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.
Optionalconstconst requires the field value to exactly match the specified boolean value.
If the field value doesn't match, an error message is generated.
message MyBool {
// value must equal true
bool value = 1 [(buf.validate.field).bool.const = true];
}
example specifies values that the field may have. These values SHOULD
conform to other rules. example values will not impact validation
but may be used as helpful guidance on how to populate the given field.
message MyBool {
bool value = 1 [
(buf.validate.field).bool.example = 1,
(buf.validate.field).bool.example = 2
];
}
BoolRules describes the rules applied to
boolvalues. These rules may also be applied to thegoogle.protobuf.BoolValueWell-Known-Type.