Good news for all of you waiting for an early version of Hibernate Validator 5 in order to experiment with the new Bean Validation 1.1 (JSR 349) features. Hibernate Validator 5.0.0.Alpha1 is now available for download in the JBoss Maven Repository under the GAV org.hibernate:hibernate-validator:5.0.0.Alpha1 or via SourceForge.

The focus of the release was the alignment of Hibernate Validator with the first early draft of Bean Validation 1.1 (1.1.0.Alpha1). The Hibernate Validator changelog circles for this reason around HV-571 which served as placeholder for those specification changes. Of course the biggest change was the formalization of method validation, but there are other interesting new features as well. For example:

  • In conjunction with method validation it is worth having a look at the ParameterNameProvider interface which helps to identify the parameter of a failing parameter constraint in the resulting ConstraintViolation. The Path API was also extended to provide additional meta information about a failing constraint. You can get the element descriptor via Path.Node#getElementDescriptor (of course you need to iterate to the leaf node of first). The element discriptors themselves got extended by ConstructorDescriptor, MethodDescriptor, ParameterDescriptor and ReturnValueDescriptor.
  • Support for container injection in ConstraintValidator. Check out the new life cycle methods ValidatorFactory#close and ConstraintValidatorFactory#releaseInstance in this context.
  • Expose settings defined in XML in the Configuration API. Refer to the new interface javax.validation.ConfigurationSource, but be aware that there is a follow up issue (BVAL-292) as well.

The easiest way to find out more about these new interfaces and classes is to have a look at the Hibernate Validator test suite where you will find tests for all the mentioned new features.

There are more proposals which are still under active discussion. Feel free to contribute :-)

Given that this is an early draft there will be further changes to the API. For this reason Hibernate Validator 5.0.0.Alpha1 is not a production release. On the other hand, for integrators and tool developers it makes a lot of sense to have an early evaluation to see whether we are on the right track.


26. Jun 2012, 15:40 CET | Link

The method validation link is broken, but removing the backslash fixes it.

26. Jun 2012, 16:28 CET | Link

I fixed the link, many thanks

19. May 2014, 06:20 CET | Link

Individuals yet provide awesome devices. In these days, the agency comes with grew the country's region and therefore the devices are intended simultaneously for Switzerland, Asia and additionally U . s.

11. Jul 2014, 08:46 CET | Link
Brucewayne | bruce8824(AT)

The hibernate validator has been helpful for me. It has helped to state and authenticate application constraints. This application has indeed spared me a lot of time and effort, by making my work simpler. Keep sharing more updates on this.

31. Jul 2014, 09:28 CET | Link

Nice post. i used to be checking perpetually this diary and I’m Pass bee Media impressed! extraordinarily helpful data specially the last half I look after such info plenty. i used to be seeking this sure data for a protracted time. thanks and smart luck.

08. Aug 2014, 13:06 CET | Link

This kind of module can assist you create custom made outputs with regard to nodes as well as causes it to become simpler with regard.

01. Sep 2014, 06:19 CET | Link

I would agree, and it is true that no private organization or corporation was criminally charged or convicted.Learn English Accent I hope the law and the trial justice would do about this issue. I'm sure lots of normal people also thinking about it.

01. Sep 2014, 10:25 CET | Link
Good post. i once was checking constantly this work schedule and I’m Move bee Advertising impressed! extraordinarily beneficial data specially the last half I maintain such info plenty. i once was seeking this kind of sure data to get a protracted time period. thanks and also smart fortune. For more info
Post Comment