We just published Hibernate Validator 9.1.0.Beta1, the next release of the new 9.1 series of Hibernate Validator.
Compared to the previous release in this series, 9.1.0.Beta1 contains a new constraint, few improvements, fixes and dependency updates.
As this release includes significant changes to the processed bean tracking, path implementation and related areas, we encourage users to give it a try and report any findings, especially if there are non-trivial validation scenarios. |
What’s new
IpAddress
constraint
The new @IpAddress
constraint validates that the corresponding string is a well-formed IP address.
This constraint provides a IpAddress.Type
enum with the IP address types it can validate: IPv4
, IPv6
or ANY
.
By default, IpAddress.ANY
is used, which allows validating all the other address types listed in the IpAddress.Type
enum.
@IpAddress (1)
String address;
// ...
@IpAddress(type = IpAddress.Type.IPv6) (2)
private String address;
1 | Using a default configuration of the @IpAddress constraint,
where both IPv4 and IPv6 address types are considered valid. |
2 | Applying the @IpAddress constraint, where only the IPv6 addresses are considered valid. |
Other improvements and bug fixes
Please see the release notes for a complete list of changes since the previous releases.
How to get this release
Hibernate Validator 9 targets the Jakarta EE 11.
All details are available and up to date on the dedicated page on hibernate.org.
Getting started, migrating
For new applications, please refer to the getting started guide:
For existing applications, Hibernate Validator 9.1 is a drop-in replacement for 9.0. Information about deprecated configuration and API is included in the migration guide.
Feedback, issues, ideas?
To get in touch, use the usual channels:
-
hibernate-validator tag on Stack Overflow (usage questions)
-
User forum (usage questions, general feedback)
-
Issue tracker (bug reports, feature requests)
-
Mailing list (development-related discussions)
-
Jakarta Validation development mailing list (discussions about the Jakarta Validation specification)