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 #7686
  • Loading branch information
cdhermann committed Jan 12, 2023
1 parent f1be907 commit 9de3b94
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/src/main/asciidoc/validation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,16 @@ 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.

== 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
<<configuring-the-validatorfactory>>.

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

Expand Down

0 comments on commit 9de3b94

Please sign in to comment.