protoc-gen-validate icon indicating copy to clipboard operation
protoc-gen-validate copied to clipboard

Java - support for validateAll semantics

Open rosslamont opened this issue 2 years ago • 2 comments

According to documentation, the go version supports ValidateAll. Java assertion style validation is too limiting for most uses

rosslamont avatar May 26 '22 00:05 rosslamont

I've started implementing a solution. The solution involves a refactoring of ValidatorIndex into a more abstract ValidatorContext which contains the ValidatorIndex and a ValidatorCollector which is used to wrap all validations. Implementations of ValidatorCollector can do different things, generally by catching ValidationExceptions and converting them to something more appropriate.

rosslamont avatar May 31 '22 03:05 rosslamont

I was just about to ask whether there's Java support for something likeValidateAll. I've seen this PR https://github.com/envoyproxy/protoc-gen-validate/pull/468 but nothing in Java yet.

iampava avatar Jul 06 '22 13:07 iampava

I want to thank you for your suggestion regarding the support for validateAll semantics in Java. The good news is that this feature is already available and fully supported in our protovalidate project.

Moving forward we will continue to enhance protovalidate for a more comprehensive and user-friendly experience within the Protobuf ecosystem. As such, I will be closing this issue. If you have more suggestions or questions in the future, please feel free to reach out.

elliotmjackson avatar Aug 10 '23 19:08 elliotmjackson