protoc-gen-validate
protoc-gen-validate copied to clipboard
[C++] Map key value string length message misleading
Hi,
I use the following rules on a map<string, string>:
(validate.rules).map.keys.string.min_len = 1,
And when the rule is not respected, the error message is ending by:
value length must be at least 1 characters
Shouldn't it be:
key length must be at least 1 characters
Besause it is not clear if the key or the value do not respect the rule
Regards
[GO] I use the following rules on a map<string, string>
[(validate.rules).map = {ignore_empty: true, keys: {string: {ignore_empty: true, pattern:"^[a-zA-Z- ]+$"}}, values: {string : {ignore_empty: true, pattern:"^[^<>]+$"}}}];
In file validate.go:
Regards