# Hibernate Validator

**URL:** https://discourse.hibernate.org/c/hibernate-validator/7.md

[Latest](https://discourse.hibernate.org/latest.md) · [Categories](https://discourse.hibernate.org/categories.md)

---

## [About the Hibernate Validator category](https://discourse.hibernate.org/t/about-the-hibernate-validator-category/16)

<div class="topic-metadata">

**Author:** [@gsmet](https://discourse.hibernate.org/u/gsmet)\
**Replies:** 0\
**Last updated:** [December 11, 2017, 10:08am UTC](https://discourse.hibernate.org/t/about-the-hibernate-validator-category/16 "2017-12-11T10:08:02Z")

</div>

Discussions about Hibernate Validator, the application layer agnostic validation library.

---

## [@Valid on containers is deprecated but validation doesn't always work the same if moving it to the elements](https://discourse.hibernate.org/t/valid-on-containers-is-deprecated-but-validation-doesnt-always-work-the-same-if-moving-it-to-the-elements/12400)

<div class="topic-metadata">

**Author:** [@NicolasV](https://discourse.hibernate.org/u/NicolasV)\
**Replies:** 1\
**Last updated:** [August 26, 2026, 9:47am UTC](https://discourse.hibernate.org/t/valid-on-containers-is-deprecated-but-validation-doesnt-always-work-the-same-if-moving-it-to-the-elements/12400 "2026-08-26T09:47:59Z")

</div>

Hello ! I’m trying to update our code to follow the deprecation of annotation @Valid at container level. It works well in most situations, but in one the validation changed behavior. I have an interface EventsControlle…

---

## [RegexpURLValidator throws NPE when URL has no authority component](https://discourse.hibernate.org/t/regexpurlvalidator-throws-npe-when-url-has-no-authority-component/12361)

<div class="topic-metadata">

**Author:** [@burl21](https://discourse.hibernate.org/u/burl21)\
**Replies:** 4\
**Last updated:** [July 6, 2026, 9:53am UTC](https://discourse.hibernate.org/t/regexpurlvalidator-throws-npe-when-url-has-no-authority-component/12361 "2026-07-06T09:53:25Z")

</div>

RegexpURLValidator.isValid() calls DomainNameUtil.isValidDomainAddress(values.getHost()) without null checking the host. The host is extracted from URL\_REGEX capture group 2, which is null when the input has no authority…

---

## [\[Feature Contribution Request\] @Compare constraint](https://discourse.hibernate.org/t/feature-contribution-request-compare-constraint/12236)

<div class="topic-metadata">

**Author:** [@danielpederzini](https://discourse.hibernate.org/u/danielpederzini)\
**Replies:** 3\
**Last updated:** [May 13, 2026, 8:23am UTC](https://discourse.hibernate.org/t/feature-contribution-request-compare-constraint/12236 "2026-05-13T08:23:32Z")

</div>

Hi everyone, I’d like to contribute a small new constraint to Hibernate Validator and wanted to get feedback before starting implementation. The idea is a minimal @Compare class-level constraint for common cross-field …

---

## [Invalid documentation for the Polish NIP validator](https://discourse.hibernate.org/t/invalid-documentation-for-the-polish-nip-validator/12078)

<div class="topic-metadata">

**Author:** [@Jarek](https://discourse.hibernate.org/u/Jarek)\
**Replies:** 1\
**Last updated:** [December 31, 2025, 2:43pm UTC](https://discourse.hibernate.org/t/invalid-documentation-for-the-polish-nip-validator/12078 "2025-12-31T14:43:36Z")

</div>

Hi everyone, I noticed an error in the NIP validator documentation. It says: “Validates that a CharSequence is a NIP number (9-digit Polish VAT identification number).” However, in Poland a NIP has 10 digits. Fortunatel…

---

## [Value extraction does not preserve generic type information](https://discourse.hibernate.org/t/value-extraction-does-not-preserve-generic-type-information/10561)

<div class="topic-metadata">

**Author:** [@Lorenzo-Bracci](https://discourse.hibernate.org/u/Lorenzo-Bracci)\
**Replies:** 8\
**Last updated:** [August 25, 2025, 10:37am UTC](https://discourse.hibernate.org/t/value-extraction-does-not-preserve-generic-type-information/10561 "2025-08-25T10:37:06Z")

</div>

Issue description When using a wrapper type such as Optional and unwrapping a constraints on a given field (i.e using payload = Unwrapping.Unwrap.class) the behaviour I would expect is that the generic information of the…

---

## [Expression Language not propagated to iterable node](https://discourse.hibernate.org/t/expression-language-not-propagated-to-iterable-node/9495)

<div class="topic-metadata">

**Author:** [@jlambrechts](https://discourse.hibernate.org/u/jlambrechts)\
**Replies:** 4\
**Last updated:** [June 10, 2025, 7:09am UTC](https://discourse.hibernate.org/t/expression-language-not-propagated-to-iterable-node/9495 "2025-06-10T07:09:37Z")

</div>

Hi, After migrating from Hibernate Validator 5.1.3.Final to 8.0.1.Final I notice a difference in behaviour when defining a violation on a map key with a message that contains the expression {validatedValue.key}. In 5…

---

## [\[Feature request\] Observability: traces for validation](https://discourse.hibernate.org/t/feature-request-observability-traces-for-validation/11051)

<div class="topic-metadata">

**Author:** [@patpatpat123](https://discourse.hibernate.org/u/patpatpat123)\
**Replies:** 3\
**Last updated:** [June 10, 2025, 7:02am UTC](https://discourse.hibernate.org/t/feature-request-observability-traces-for-validation/11051 "2025-06-10T07:02:04Z")

</div>

Hello team, May I ask if it is possible to see traces for validation? I am using spring boot and the @Valid annotation, which uses this project to perform the actual validation. However, there is no observability. By…

---

## [AbstractMethodError org.hibernate.ejb.HibernatePersistence.getProviderUtil()Ljavax/persistence/spi/ProviderUtil;](https://discourse.hibernate.org/t/abstractmethoderror-org-hibernate-ejb-hibernatepersistence-getproviderutil-ljavax-persistence-spi-providerutil/9679)

<div class="topic-metadata">

**Author:** [@taehee\_lim](https://discourse.hibernate.org/u/taehee_lim)\
**Replies:** 1\
**Last updated:** [June 3, 2024, 6:32am UTC](https://discourse.hibernate.org/t/abstractmethoderror-org-hibernate-ejb-hibernatepersistence-getproviderutil-ljavax-persistence-spi-providerutil/9679 "2024-06-03T06:32:07Z")

</div>

I have an issue which is about using bean-validation api in Linux Server. The problem is that bean validation works just fine in my local window PC. But when it runs in Cent OS. For some reasons, it does not work. I mod…

---

## [Nondeterministic behavior of HibernateValidator (in springboot?) when both annotation and xml-based definition are used](https://discourse.hibernate.org/t/nondeterministic-behavior-of-hibernatevalidator-in-springboot-when-both-annotation-and-xml-based-definition-are-used/7679)

<div class="topic-metadata">

**Author:** [@alfonz19](https://discourse.hibernate.org/u/alfonz19)\
**Replies:** 3\
**Last updated:** [May 23, 2023, 8:32am UTC](https://discourse.hibernate.org/t/nondeterministic-behavior-of-hibernatevalidator-in-springboot-when-both-annotation-and-xml-based-definition-are-used/7679 "2023-05-23T08:32:47Z")

</div>

MWE: GitHub - alfonz19/validator-fail-mwe After fresh app start calling validation of annotated DTO will work as expected, and after that also validation of DTO having validation defined in validation-constraints.xml wi…

---

## [ClockProvider from root bean property and cascading](https://discourse.hibernate.org/t/clockprovider-from-root-bean-property-and-cascading/7513)

<div class="topic-metadata">

**Author:** [@floresm.leonardo](https://discourse.hibernate.org/u/floresm.leonardo)\
**Replies:** 4\
**Last updated:** [April 17, 2023, 4:01pm UTC](https://discourse.hibernate.org/t/clockprovider-from-root-bean-property-and-cascading/7513 "2023-04-17T16:01:41Z")

</div>

Hi everybody, I am implementing a framework that requires a class-level Customs Validator to verify temporal data. It looks like the ClockProvider is the recommended way to verify fields that are time sensitive. Now, m…

---

## [How can I get the root bean in a custom validator,When using field-level constraints field access strategy](https://discourse.hibernate.org/t/how-can-i-get-the-root-bean-in-a-custom-validator-when-using-field-level-constraints-field-access-strategy/6949)

<div class="topic-metadata">

**Author:** [@alan](https://discourse.hibernate.org/u/alan)\
**Replies:** 10\
**Last updated:** [December 19, 2022, 11:23am UTC](https://discourse.hibernate.org/t/how-can-i-get-the-root-bean-in-a-custom-validator-when-using-field-level-constraints-field-access-strategy/6949 "2022-12-19T11:23:09Z")

</div>

Hi guys, I’m implement a custom corrrelation validator, just like this: Correlation.java @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD}) @Constraint(validatedBy = CorrelationValidator.clas…

---

## [Using Validator as a generic engine for file (json, CSV) based entity validation](https://discourse.hibernate.org/t/using-validator-as-a-generic-engine-for-file-json-csv-based-entity-validation/6902)

<div class="topic-metadata">

**Author:** [@Sam\_R](https://discourse.hibernate.org/u/Sam_R)\
**Replies:** 0\
**Last updated:** [November 15, 2022, 12:30am UTC](https://discourse.hibernate.org/t/using-validator-as-a-generic-engine-for-file-json-csv-based-entity-validation/6902 "2022-11-15T00:30:42Z")

</div>

Hi, Is is possible to use the rich set of Validator provided by Hibernate to validate data from CSV or json by calling validators programmatically instead of defining as annotations on Java entities or having to force m…

---

## [Validator.validate() is not being called during test](https://discourse.hibernate.org/t/validator-validate-is-not-being-called-during-test/6649)

<div class="topic-metadata">

**Author:** [@positronus\_p](https://discourse.hibernate.org/u/positronus_p)\
**Replies:** 0\
**Last updated:** [September 12, 2022, 2:25am UTC](https://discourse.hibernate.org/t/validator-validate-is-not-being-called-during-test/6649 "2022-09-12T02:25:09Z")

</div>

Annotation for my ConstraintValidator implementation is defined as PARAMETER @Target({PARAMETER, ANNOTATION\_TYPE, TYPE\_USE}) During the test, Validator’s validate() method is not being called, but isValid() does. If I…

---

## [Can we disable Jboss-logging for Hibernate Validator 6.0.17](https://discourse.hibernate.org/t/can-we-disable-jboss-logging-for-hibernate-validator-6-0-17/3746)

<div class="topic-metadata">

**Author:** [@jyothsna](https://discourse.hibernate.org/u/jyothsna)\
**Replies:** 4\
**Last updated:** [August 24, 2022, 8:57am UTC](https://discourse.hibernate.org/t/can-we-disable-jboss-logging-for-hibernate-validator-6-0-17/3746 "2022-08-24T08:57:27Z")

</div>

Hi, We are using Hibernate-validator 6.0.17. We want to disable jboss-logging. Our main aim is to remove dependency jboss-logging.jar. Any suggestions on, how to configure it / disable. (To remove that jar dependency)…

---

## [About hibernate validator error codes](https://discourse.hibernate.org/t/about-hibernate-validator-error-codes/6379)

<div class="topic-metadata">

**Author:** [@Babken](https://discourse.hibernate.org/u/Babken)\
**Replies:** 0\
**Last updated:** [June 10, 2022, 10:36am UTC](https://discourse.hibernate.org/t/about-hibernate-validator-error-codes/6379 "2022-06-10T10:36:42Z")

</div>

Hi all. Can I implement error handling based on HV00x error codes of Hibernate Validator? I expected to get specific exceptions for each error case, but since the difference is only represented by error codes in the mes…

---

## [Best way to use group sequence hibernate validator](https://discourse.hibernate.org/t/best-way-to-use-group-sequence-hibernate-validator/6346)

<div class="topic-metadata">

**Author:** [@Rahul\_Kumar](https://discourse.hibernate.org/u/Rahul_Kumar)\
**Replies:** 0\
**Last updated:** [May 19, 2022, 3:46am UTC](https://discourse.hibernate.org/t/best-way-to-use-group-sequence-hibernate-validator/6346 "2022-05-19T03:46:09Z")

</div>

Sequencing validator annotation (Custom or Default ) and stop execution further, if it fails.

---

## [What key is used to sign Hibernate Validator releases?](https://discourse.hibernate.org/t/what-key-is-used-to-sign-hibernate-validator-releases/6182)

<div class="topic-metadata">

**Author:** [@evan](https://discourse.hibernate.org/u/evan)\
**Replies:** 1\
**Last updated:** [March 29, 2022, 2:49pm UTC](https://discourse.hibernate.org/t/what-key-is-used-to-sign-hibernate-validator-releases/6182 "2022-03-29T14:49:37Z")

</div>

Hi, What key is used to sign Hibernate Validator releases? I saw HV-1871 added release signing but it is unclear which key(s) are authorized to sign releases. Regards, Evan

---

## [Validation Implementation in a Common Library with Conflicting Versions of hibernate-validator](https://discourse.hibernate.org/t/validation-implementation-in-a-common-library-with-conflicting-versions-of-hibernate-validator/6005)

<div class="topic-metadata">

**Author:** [@helloworldless](https://discourse.hibernate.org/u/helloworldless)\
**Replies:** 1\
**Last updated:** [January 27, 2022, 5:57pm UTC](https://discourse.hibernate.org/t/validation-implementation-in-a-common-library-with-conflicting-versions-of-hibernate-validator/6005 "2022-01-27T17:57:28Z")

</div>

I have created a common library which is being used as a dependency in several Spring Boot applications. I added some validation to POJOs in the common library using hibernate-validator:7.0.2-Final, and the common librar…

---

## [Hibernate Vulnerability solution](https://discourse.hibernate.org/t/hibernate-vulnerability-solution/5999)

<div class="topic-metadata">

**Author:** [@roopa](https://discourse.hibernate.org/u/roopa)\
**Replies:** 0\
**Last updated:** [January 25, 2022, 6:41am UTC](https://discourse.hibernate.org/t/hibernate-vulnerability-solution/5999 "2022-01-25T06:41:06Z")

</div>

HI 5.4.3 is reported as vulnerable, so planned to upgrade to 6.0.1 but WASND is not 9 version so deployment failed. Now I tried to downgrade it to 4.3.0.Final which has no vulnerable reported but deployment gets error …

---

## [Validating in spring mvc](https://discourse.hibernate.org/t/validating-in-spring-mvc/5922)

<div class="topic-metadata">

**Author:** [@Jayhmz](https://discourse.hibernate.org/u/Jayhmz)\
**Replies:** 0\
**Last updated:** [December 24, 2021, 3:43pm UTC](https://discourse.hibernate.org/t/validating-in-spring-mvc/5922 "2021-12-24T15:43:18Z")

</div>

I have issues using jsr 349 validator and hibernate validator implementation to validate user input using spring form in my spring mvc project. i used maven repository javax-validator api and hibernate-validator but it s…

---

## [UnsupportedOperationException when using @Past constraint](https://discourse.hibernate.org/t/unsupportedoperationexception-when-using-past-constraint/5914)

<div class="topic-metadata">

**Author:** [@BenoitD](https://discourse.hibernate.org/u/BenoitD)\
**Replies:** 3\
**Last updated:** [December 23, 2021, 12:56pm UTC](https://discourse.hibernate.org/t/unsupportedoperationexception-when-using-past-constraint/5914 "2021-12-23T12:56:28Z")

</div>

Hello, I run into a problem. I have persistent field of type java.util.Date with the following annotations @NotNull @Temporal(TemporalType.DATE) @Past private Date birthDate; In a container managed transaction I …

---

## [Getter name being prefixed to property path](https://discourse.hibernate.org/t/getter-name-being-prefixed-to-property-path/5075)

<div class="topic-metadata">

**Author:** [@arnieAustin](https://discourse.hibernate.org/u/arnieAustin)\
**Replies:** 1\
**Last updated:** [December 23, 2021, 7:38am UTC](https://discourse.hibernate.org/t/getter-name-being-prefixed-to-property-path/5075 "2021-12-23T07:38:40Z")

</div>

I have a class level constraint designed to validate an address block (streets, city, zip, country, state, county). Everything works great (mostly) but I’m confused about something. In the UI DTO, I have a member which …

---

## [Hibernate-validatior: Why is the MyCustomConstraintValidator not a managed instance in the weld-se container?](https://discourse.hibernate.org/t/hibernate-validatior-why-is-the-mycustomconstraintvalidator-not-a-managed-instance-in-the-weld-se-container/5671)

<div class="topic-metadata">

**Author:** [@duschata](https://discourse.hibernate.org/u/duschata)\
**Replies:** 1\
**Last updated:** [September 13, 2021, 9:13am UTC](https://discourse.hibernate.org/t/hibernate-validatior-why-is-the-mycustomconstraintvalidator-not-a-managed-instance-in-the-weld-se-container/5671 "2021-09-13T09:13:21Z")

</div>

Hello All, In our project we are testing jpa database access with the weld-junit5 framework. The EntityManager is injected via CDI into the test class. A Bean Validation (hibernate-validator) is present in the classpath…

---

## [ValueHandlerFactory](https://discourse.hibernate.org/t/valuehandlerfactory/5531)

<div class="topic-metadata">

**Author:** [@ALekseiMokhov](https://discourse.hibernate.org/u/ALekseiMokhov)\
**Replies:** 0\
**Last updated:** [July 9, 2021, 11:39am UTC](https://discourse.hibernate.org/t/valuehandlerfactory/5531 "2021-07-09T11:39:16Z")

</div>

Hi everyone I’ve got question about BooleanValueHandler in ValueHandlerFactory. It’s supposed to accept system properties, but why not to overload it by Boolean.getValue()? My colleague is struggling right now converti…

---

## [Weblogic has old version of Bean Validator](https://discourse.hibernate.org/t/weblogic-has-old-version-of-bean-validator/2498)

<div class="topic-metadata">

**Author:** [@DougBaughman](https://discourse.hibernate.org/u/DougBaughman)\
**Replies:** 4\
**Last updated:** [June 16, 2021, 9:39am UTC](https://discourse.hibernate.org/t/weblogic-has-old-version-of-bean-validator/2498 "2021-06-16T09:39:34Z")

</div>

This is an issue of using the hibernate bean validator with weblogic 12. It may be more of a weblogic issue, but posting here in hopes that someone may have some ideas. I have a dependency in my maven pom for hibernate…

---

## [Queries appears in startup for each entity](https://discourse.hibernate.org/t/queries-appears-in-startup-for-each-entity/5295)

<div class="topic-metadata">

**Author:** [@omarelas](https://discourse.hibernate.org/u/omarelas)\
**Replies:** 0\
**Last updated:** [April 26, 2021, 2:21pm UTC](https://discourse.hibernate.org/t/queries-appears-in-startup-for-each-entity/5295 "2021-04-26T14:21:58Z")

</div>

Hi everyone, When i start the application i see some insert/delete/update queries for each entity (193 entities) in startup those entities still in the memory and memory leak happen while my app is processing . I dont…

---

## [Can hibernate validator check syntax from an ide at compile time?](https://discourse.hibernate.org/t/can-hibernate-validator-check-syntax-from-an-ide-at-compile-time/5132)

<div class="topic-metadata">

**Author:** [@Guglielmo\_Fanini](https://discourse.hibernate.org/u/Guglielmo_Fanini)\
**Replies:** 0\
**Last updated:** [March 3, 2021, 2:53am UTC](https://discourse.hibernate.org/t/can-hibernate-validator-check-syntax-from-an-ide-at-compile-time/5132 "2021-03-03T02:53:33Z")

</div>

Is it possible to detect possible hibernate (4) errors at compile time, in an ide like eclipse/intellij ? I am getting an error upon deploying on jboss, is it possible to detect annotation errors and possibly suggest a …

---

## [Javax validation api. Add a field from the parent bean to the validation message](https://discourse.hibernate.org/t/javax-validation-api-add-a-field-from-the-parent-bean-to-the-validation-message/5093)

<div class="topic-metadata">

**Author:** [@Stanislav\_Panov](https://discourse.hibernate.org/u/Stanislav_Panov)\
**Replies:** 1\
**Last updated:** [February 20, 2021, 4:14pm UTC](https://discourse.hibernate.org/t/javax-validation-api-add-a-field-from-the-parent-bean-to-the-validation-message/5093 "2021-02-20T16:14:52Z")

</div>

Hi! I have a question about the javax validation api, specifically, is it possible to generate a validation message of the following format. For example, there are classes with a nested structure: Model, Attribute, and…

---

## [Cross scripting validators](https://discourse.hibernate.org/t/cross-scripting-validators/5085)

<div class="topic-metadata">

**Author:** [@tester123](https://discourse.hibernate.org/u/tester123)\
**Replies:** 1\
**Last updated:** [February 18, 2021, 4:13pm UTC](https://discourse.hibernate.org/t/cross-scripting-validators/5085 "2021-02-18T16:13:21Z")

</div>

Hi I need hibernate validation for “multipart” file and for the code below: “return new responseentity(this, httpstatus.internalservererror)” i appreciate your help -regards

[Next page](https://discourse.hibernate.org/c/hibernate-validator/7.md?page=1)
