Skip to content

Conversation

rsaLive
Copy link

@rsaLive rsaLive commented Sep 10, 2024

show code

message CreArtProResponse {
        string Msg   =   1  [json_name = "msg"];
        ArtworkAddRes Data   = 2  [json_name = "data"];
        repeated string Uuids = 3 [(validator.field) = {repeated_count_min: 1,human_error: "At least one department is required"}];
}
if len(this.Uuids) < 1 {
		return github_com_mwitkow_go_proto_validators.FieldError("Uuids", fmt.Errorf(`At least one department is required`))
	}
	for _, item := range this.Uuids {
	}

error

item is generated but not used

modify

If fieldName is RepeatedCountMin or RepeatedCountMax, it returns false.

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

Successfully merging this pull request may close these issues.

1 participant