Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions documentation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<asciidoctor.engine-source-dir>${basedir}/../engine/src/main/java</asciidoctor.engine-source-dir>

<html.meta.project-key>validator</html.meta.project-key>
<html.outdated-content.project-key>${html.meta.project-key}</html.outdated-content.project-key>
<html-outdated-content-project-key>${html.meta.project-key}</html-outdated-content-project-key>

<surefire.jvm.args.additional>-Duser.language=en -Duser.country=US</surefire.jvm.args.additional>

Expand Down Expand Up @@ -227,7 +227,7 @@
<stylesdir>css</stylesdir>
<iconfont-remote>false</iconfont-remote>
<iconfont-name>font-awesome/css/font-awesome.min</iconfont-name>
<source-highlighter>prettify</source-highlighter>
<source-highlighter>rouge</source-highlighter>
</attributes>
</configuration>
</execution>
Expand All @@ -240,10 +240,13 @@
<extension>
<className>org.hibernate.infra.asciidoctor.extensions.copytoclipboard.CopyToClipboardProcessor</className>
</extension>
<extension>
<className>org.hibernate.infra.asciidoctor.extensions.sourcecodelanguage.SourcecodeLanguagePreprocessor</className>
</extension>
</extensions>
<sourceDocumentName>index.asciidoc</sourceDocumentName>
<sourceDocumentName>index.adoc</sourceDocumentName>
<attributes>
<docinfodir>${asciidoctor.aggregated-resources-dir}/docinfo/noorm-documentation</docinfodir>
<docinfodir>${asciidoctor.aggregated-resources-dir}/docinfo/hibernate</docinfodir>
<icons>font</icons>
<tabsize>4</tabsize>

Expand All @@ -252,6 +255,7 @@
<engine-sourcedir>${asciidoctor.engine-source-dir}</engine-sourcedir>

<hvVersion>${project.version}</hvVersion>
<hvVersionShort>${parsed-version.org.hibernate.validator.majorVersion}.${parsed-version.org.hibernate.validator.minorVersion}</hvVersionShort>
<bvVersion>${version.jakarta.validation-api}</bvVersion>
<jbossLoggingVersion>${version.org.jboss.logging.jboss-logging}</jbossLoggingVersion>
<classmateVersion>${version.com.fasterxml.classmate}</classmateVersion>
Expand Down Expand Up @@ -321,6 +325,7 @@
<configuration>
<backend>pdf</backend>
<outputDirectory>${asciidoctor.base-output-dir}/pdf</outputDirectory>
<requires>${asciidoctor.aggregated-resources-dir}/theme/hibernate.rb</requires>
<attributes>
<imagesdir>${asciidoctor.aggregated-resources-dir}/images/</imagesdir>
<pdf-themesdir>${asciidoctor.aggregated-resources-dir}/theme</pdf-themesdir>
Expand All @@ -329,7 +334,8 @@
<pagenums/>
<idprefix/>
<idseparator>-</idseparator>
<source-highlighter>coderay</source-highlighter>
<source-highlighter>rouge</source-highlighter>
<rouge-style>hibernate</rouge-style>
</attributes>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ your __pom.xml__:

.Hibernate Validator Maven dependency
====
[source, XML]
[source, xml]
[subs="verbatim,attributes"]
----
<dependency>
Expand All @@ -42,7 +42,7 @@ implementation]:

.Maven dependencies for Unified EL reference implementation
====
[source, XML]
[source, xml]
[subs="verbatim,attributes"]
----
<dependency>
Expand Down Expand Up @@ -71,7 +71,7 @@ Validator CDI portable extension by adding the following Maven dependency to you

.Hibernate Validator CDI portable extension Maven dependency
====
[source, XML]
[source, xml]
[subs="verbatim,attributes"]
----
<dependency>
Expand Down Expand Up @@ -115,7 +115,7 @@ Let's dive directly into an example to see how to apply constraints.
[[example-class-car]]
.Class Car annotated with constraints
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter01/Car.java[]
----
Expand Down Expand Up @@ -144,7 +144,7 @@ unit test for `Car`:

.Class CarTest showing validation examples
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter01/CarTest.java[]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ level configuration example:
[[example-field-level]]
.Field-level constraints
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/fieldlevel/Car.java[tags=include]
----
Expand Down Expand Up @@ -66,7 +66,7 @@ constraints are used.
[[example-property-level]]
.Property-level constraints
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/propertylevel/Car.java[tags=include]
----
Expand Down Expand Up @@ -129,12 +129,12 @@ element. <<example-container-element-constraints-iterable>> shows an example of
[[example-container-element-constraints-iterable]]
.Container element constraint on `Set`
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/set/Car.java[tags=include]
----

[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/set/CarTest.java[tags=validateSetContainerElementConstraint]
----
Expand All @@ -151,12 +151,12 @@ element. <<example-container-element-constraints-list>> shows an example of a
[[example-container-element-constraints-list]]
.Container element constraint on `List`
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/list/Car.java[tags=include]
----

[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/list/CarTest.java[tags=validateListContainerElementConstraint]
----
Expand All @@ -173,17 +173,17 @@ and a constraint on the value.
[[example-container-element-constraints-map]]
.Container element constraint on map keys and values
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/map/Car.java[tags=include]
----

[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/map/CarTest.java[tags=validateMapValueContainerElementConstraint]
----

[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/map/CarTest.java[tags=validateMapKeyContainerElementConstraint]
----
Expand All @@ -204,12 +204,12 @@ an example of an `Optional` with a container element constraint.
[[example-container-element-constraints-optional]]
.Container element constraint on Optional
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/optional/Car.java[tags=include]
----

[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/optional/CarTest.java[tags=validateOptionalContainerElementConstraint]
----
Expand All @@ -232,27 +232,27 @@ parameterized type with a type argument constraint.
[[example-container-element-constraints-custom-container-type]]
.Container element constraint on custom container type
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/custom/Car.java[tags=include]
----

[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/custom/GearBox.java[tags=include]
----

[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/custom/Gear.java[tags=include]
----

[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/custom/GearBoxValueExtractor.java[tags=include]
----

[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/custom/CarTest.java[tags=validateCustomContainerElementConstraint]
----
Expand All @@ -268,7 +268,7 @@ constraints on `Part` and `Manufacturer` will be enforced.
[[example-container-element-nested]]
.Constraints on nested container elements
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/containerelement/nested/Car.java[tags=include]
----
Expand All @@ -293,7 +293,7 @@ constraint.
[[example-class-level]]
.Class-level constraint
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/classlevel/Car.java[tags=include]
----
Expand All @@ -308,12 +308,12 @@ things clearer let's have a look at the following example:

.Constraint inheritance
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/inheritance/Car.java[tags=include]
----

[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/inheritance/RentalCar.java[tags=include]
----
Expand All @@ -339,12 +339,12 @@ reference to another object with `@Valid` as demonstrated in <<example-cascaded-
[[example-cascaded-validation]]
.Cascaded validation
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/objectgraph/Car.java[tags=include]
----

[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/objectgraph/Person.java[tags=include]
----
Expand Down Expand Up @@ -373,17 +373,17 @@ Cascaded validation is also supported for nested container elements.
[[example-cascaded-validation-list]]
.Cascaded validation of containers
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/objectgraph/containerelement/Car.java[tags=include]
----

[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/objectgraph/containerelement/Part.java[tags=include]
----

[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/objectgraph/containerelement/Manufacturer.java[tags=include]
----
Expand Down Expand Up @@ -423,7 +423,7 @@ use the static method `Validation#buildDefaultValidatorFactory()`:

.`Validation#buildDefaultValidatorFactory()`
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/validation/ValidationTest.java[tags=setUpValidator]
----
Expand Down Expand Up @@ -456,7 +456,7 @@ property. The validation call therefore returns one `ConstraintViolation` object
[[example-validator-validate]]
.Using `Validator#validate()`
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/validation/ValidationTest.java[tags=validate]
----
Expand All @@ -470,7 +470,7 @@ property name is the JavaBeans property name.

.Using `Validator#validateProperty()`
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/validation/ValidationTest.java[tags=validateProperty]
----
Expand All @@ -484,7 +484,7 @@ validated successfully, if the property had the specified value:

.Using `Validator#validateValue()`
====
[source, JAVA, indent=0]
[source, java, indent=0]
----
include::{sourcedir}/org/hibernate/validator/referenceguide/chapter02/validation/ValidationTest.java[tags=validateValue]
----
Expand Down
Loading