Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

item declared and not used when meet repeated type #73

Open
rebill opened this issue Aug 21, 2019 · 0 comments
Open

item declared and not used when meet repeated type #73

rebill opened this issue Aug 21, 2019 · 0 comments

Comments

@rebill
Copy link

rebill commented Aug 21, 2019

repeated string name = 1 [(validator.field) = {repeated_count_min : 1, human_error: "Name can not be empty"}];
when build:

item declared and not used
validator code contains this loop:

 for _, item := range this.Name {
 }

I saw https://github.com/mwitkow/go-proto-validators/pull/66/files#diff-daed06840ae2242793f6bca24ba9b8bd

if fieldName != "RepeatedCountMin" && fieldName != "RepeatedCountMax" {
			return true
		}

I think human_error break your rule, can you fix it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant