JSR 303 Bean Validation contains out of the box some constrains, but also allow to define custom constrains.
I have the feeling that there are a lot of constraints common for a lot of projects that are not shipped with the JSR implementations.
So my question is: Is there a (trustworthy) library that contains commons jsr 303 (Bean Validation) constraints?
I'm not aware of a dedicated constraint library, but the JSR 303 reference implementation Hibernate Validator provides several additional constraints, such as @Email
, @ScriptAssert
, @URL
etc. (disclaimer: I'm contributing to Hibernate Validator).
If you have additional ideas or requirements for other constraints, feel free to create a feature request in our JIRA instance.
I came to the same result that there is no such library. So I decided to share my little set of common constraints and its validators: https://github.com/malkusch/validation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With