Skip to content

Commit

Permalink
Update 09-validate.md (#212)
Browse files Browse the repository at this point in the history
type err
  • Loading branch information
githibmaster authored Aug 17, 2024
1 parent 125f91d commit 3d28126
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Here are some examples of parameter validation for several common situations, yo
// id must be greater than 0
int64 id = 1 [(validate.rules).int64 = {gt: 0}];
// age must be in the range (0, 120]
int32 age = 2 [(validate.rules).int64 = {gt:0, lte: 120}];
int32 age = 2 [(validate.rules).int32 = {gt:0, lte: 120}];
// code must be either 1, 2, or 3
uint32 code = 3 [(validate.rules).uint32 = {in: [1,2,3]}];
// score cannot be 0 nor 0.99
Expand Down

0 comments on commit 3d28126

Please sign in to comment.