mwitkow / go-proto-validators

Generate message validators from .proto annotations.
Apache License 2.0
1.09k stars 164 forks source link

could error message FieldName be json tag? #102

Open GerryLon opened 3 years ago

GerryLon commented 3 years ago
return github_com_mwitkow_go_proto_validators.FieldError("ProjectName", fmt.Errorf(`value '%v' must not be an empty string`, this.ProjectName))
ProjectName          string   `protobuf:"bytes,3,opt,name=project_name,proto3" json:"project_name,omitempty"`

if error message's FieldName set toproject_name(from json tag) will better.