Skip to content

Commit

Permalink
Add native compilation section
Browse files Browse the repository at this point in the history
I'd like to propose an additional section `Native compilation` describing how to use the `Validator` to avoid running into quarkusio#7686
  • Loading branch information
cdhermann authored and gsmet committed Jan 27, 2023
1 parent 5c3776f commit 1be06ed
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/src/main/asciidoc/validation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,15 @@ To configure the `ValidatorFactory`, use the exposed configuration properties an

Consequently, the only way to define constraints in Quarkus is by annotating your classes.

=== Native compilation

Building a `Validator` using the `ValidatorFactory` is not possible in native mode. You will end in an
error similar to `javax.validation.NoProviderFoundException: Unable to create a Configuration, because no
Jakarta Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your
classpath.`

Always use an injected `Validator`. If you have to configure the `ValidatorFactory` follow the guide at

[[configuration-reference]]
== Hibernate Validator Configuration Reference

Expand Down

0 comments on commit 1be06ed

Please sign in to comment.