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

Consider boundaries set by other fields #12

Open
dmdashenkov opened this issue Oct 1, 2021 · 1 comment
Open

Consider boundaries set by other fields #12

dmdashenkov opened this issue Oct 1, 2021 · 1 comment

Comments

@dmdashenkov
Copy link
Contributor

Right now, we only allow constant boundaries for number fields, e.g. (max).value = "42".

We could consider making the boundary values dynamic. For example:

message LocalDate {
    int32 year = 1;

    Month month = 2;

    uint32 day = 3 [(max).expression = "month->max_days"];
}

Here, max_days would be an option defined on every value of the Month enum.

@armiol
Copy link
Collaborator

armiol commented Oct 1, 2021

I would use a syntax compatible with the one of FieldMasks:

          uint32 day = 3 [(max).expression = "month.max_days"];

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

2 participants