Skip to content

Commit

Permalink
Add a blurb about not supporting validation.xml in Quarkus
Browse files Browse the repository at this point in the history
Sorta fixes quarkusio#24027 even if at some point it would be nice to implement
the support for validation.xml.

(cherry picked from commit 300e10d)
  • Loading branch information
gsmet committed Jan 28, 2023
1 parent 33432b7 commit 2f6bc1e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/src/main/asciidoc/validation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2f6bc1e

Please sign in to comment.