Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions proto/protovalidate/buf/validate/validate.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4458,7 +4458,7 @@ message DurationRules {
// ```proto
// message MyDuration {
// // value must equal 5s
// google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
// google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = { seconds: 5 }];
// }
// ```
optional google.protobuf.Duration const = 2 [(predefined).cel = {
Expand All @@ -4473,7 +4473,7 @@ message DurationRules {
// ```proto
// message MyDuration {
// // must be less than 5s
// google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
// google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 5 }];
// }
// ```
google.protobuf.Duration lt = 3 [(predefined).cel = {
Expand All @@ -4490,7 +4490,7 @@ message DurationRules {
// ```proto
// message MyDuration {
// // must be less than or equal to 10s
// google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
// google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = { seconds: 10 }];
// }
// ```
google.protobuf.Duration lte = 4 [(predefined).cel = {
Expand Down Expand Up @@ -4611,7 +4611,9 @@ message DurationRules {
// ```proto
// message MyDuration {
// // must be in list [1s, 2s, 3s]
// google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
// google.protobuf.Duration value = 1 [(buf.validate.field).duration = {
// in: [{ seconds: 1 }, { seconds: 2 }, { seconds: 3 }]
// }];
// }
// ```
repeated google.protobuf.Duration in = 7 [(predefined).cel = {
Expand All @@ -4627,7 +4629,9 @@ message DurationRules {
// ```proto
// message MyDuration {
// // value must not be in list [1s, 2s, 3s]
// google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
// google.protobuf.Duration value = 1 [(buf.validate.field).duration = {
// not_in: [{ seconds: 1 }, { seconds: 2 }, { seconds: 3 }]
// }];
// }
// ```
repeated google.protobuf.Duration not_in = 8 [(predefined).cel = {
Expand Down
14 changes: 9 additions & 5 deletions tools/internal/gen/buf/validate/validate.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading