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

Repeated int64 validation not_in is not generated #618

Closed
alvinb opened this issue Aug 2, 2022 · 1 comment
Closed

Repeated int64 validation not_in is not generated #618

alvinb opened this issue Aug 2, 2022 · 1 comment
Labels
Bug Reports and/or fixes a bug

Comments

@alvinb
Copy link

alvinb commented Aug 2, 2022

My intent: I want to allow -1 and all positive numbers. I also don't want to allow 0

syntax = "proto3";

package test;

option go_package = "test";

import "validate.proto";

Message Foo {
  repeated int64 ids = 2 [(validate.rules).repeated = {
    unique: true,
    items: {
      int64: {
        gte: -1,
        not_in:[0]
      }
    }
  }];
}

is there a way to do this or is this a bug?
related issue: #329

@elliotmjackson elliotmjackson added the Bug Reports and/or fixes a bug label Sep 8, 2022
@elliotmjackson
Copy link
Contributor

Hi @alvinb, thanks for your interest in PGV. Looking at the rules comparison table it looks like repeated fields only currently support min_items, max_items, unique & items rules. Whilst I'm positive that we endeavour to support a wider set of validation into the future, right now we are focusing on getting the quality of the existing feature set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reports and/or fixes a bug
Projects
None yet
Development

No branches or pull requests

2 participants