I know there are non-standard frameworks such as commons-validator, and hibernate validator.
I wanted to know if someone knows an implementation of the official stan
There are 2 compliant implementations now:
You can access a benchmark and a quick description of both here: http://carinae.net/2010/06/benchmarking-hibernate-validator-and-apache-beanvalidation-the-two-jsr-303-implementations/
Spring Framework became JSR303 compliant from version 3 onward I think.
http://docs.spring.io/spring/docs/current/spring-framework-reference/html/validation.html#validation-beanvalidation
Spring Framework 4.0 supports Bean Validation 1.0 (JSR-303) and Bean Validation 1.1 (JSR-349) in terms of setup support, also adapting it to Spring’s Validator interface.
As for summer 2018, there are three specifications that supersed each other:
You can consult the official site for more details.
Hibernate Validator 6.10 is a reference implementation of the newest one (380). It has a great documentation I'd recommend to take a look at (however it's quite big stuff).
CUBA platform docs could give you a much shorter grasp of the topic if you need just a fast intro. CUBA framework is based on Spring and EclipseLink, so the things you've learned could be used on regular Spring+Hibernate projects as well :)
The JSR 349 is supported by older versions of Hibernate Validator and by Apache BVal, both of them are "official".
From ORMs other than Hibernate, EclipseLink supports JSR 349 and can use Validator interface provided by HV.
If it's possible, I would recommend to not use the older version (JSR 303) but switch to 349 or 380 specs. They are quite more mature and rich.
Bean Validation could be used in the project even there is no ORM in it, for example you can use it your Java 2SE or Android apps (see this article), however, this is not the approach Bean Validation was designed for as a primary thing. Although it's possible to use these validators (HV and BVal) just by itself (you'd have to instantiate and call Validator
and ExecutableValidator
manually), they will really shine working together with frameworks like Hibernate, Spring or CUBA
Hibernate Validator is the reference implementation of JSR-303
Implementations:
OVaL is not a JSR-303 validator, but it can convert jsr303 constraints into its own.