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

Validation rules from Protovalidate #36

Closed
kidpollo opened this issue Jan 17, 2025 · 2 comments
Closed

Validation rules from Protovalidate #36

kidpollo opened this issue Jan 17, 2025 · 2 comments

Comments

@kidpollo
Copy link

Is there a plan to support protovalidate rules like

...
    string decimal_value = 2 [(buf.validate.field).string = {
      pattern: "^[0-9]+(\\.[0-9]+)?$"
    }];
...
  string email = 1 [(buf.validate.field) = {
    string: {
      email: true,
    },
    required: true
  }];
@Alfus
Copy link
Contributor

Alfus commented Jan 17, 2025

FYI, there is a nice decimal type here: https://buf.build/aep/type/docs/main:aep.type#aep.type.Decimal
(though I guess it doesn't work that well for json/yaml)

#29 will cover both these cases.

@Alfus
Copy link
Contributor

Alfus commented Jan 31, 2025

Should be done as of version 0.2.0

@Alfus Alfus closed this as completed Jan 31, 2025
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