1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 20:52:22 +00:00
2018-12-16 12:40:54 +08:00

11 lines
260 B
Protocol Buffer

syntax = "proto3";
package main;
import "github.com/mwitkow/go-proto-validators/validator.proto";
message Message {
string important_string = 1 [(validator.field) = {regex: "^[a-z]{2,5}$"}];
int32 age = 2 [(validator.field) = {int_gt: 0, int_lt: 100}];
}