From 2f6bc1e5a00057a871eeaef605fd88cc8da4481a Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Mon, 23 Jan 2023 14:28:53 +0100 Subject: [PATCH] Add a blurb about not supporting validation.xml in Quarkus Sorta fixes #24027 even if at some point it would be nice to implement the support for validation.xml. (cherry picked from commit 300e10d9d135ae332b871427133b0d72fc59a421) --- docs/src/main/asciidoc/validation.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/src/main/asciidoc/validation.adoc b/docs/src/main/asciidoc/validation.adoc index cd1c752c54641..8b05d73542e25 100644 --- a/docs/src/main/asciidoc/validation.adoc +++ b/docs/src/main/asciidoc/validation.adoc @@ -474,6 +474,19 @@ In this case, it means `Book.id` must be `null` and `Book.title` must not be bla will be validated for the `book` parameter of the `put` method. In this case, it means `Book.id` must not be `null` and `Book.title` must not be blank. +== Limitations + +=== META-INF/validation.xml + +Configuring the `ValidatorFactory` using a `META-INF/validation.xml` file is *NOT* supported in Quarkus. + +At the moment, Hibernate Validator does not expose an API to extract the information from this file +so that we could register the appropriate classes for reflection. + +To configure the `ValidatorFactory`, use the exposed configuration properties and the CDI integration. + +Consequently, the only way to define constraints in Quarkus is by annotating your classes. + [[configuration-reference]] == Hibernate Validator Configuration Reference