<commit_before>[[validator-gettingstarted]]
== Getting started

This chapter will show you how to get started with Hibernate Validator, the reference implementation (RI) of Bean Validation. For the following quick-start you need:

* A JDK 8
* http://maven.apache.org/[Apache Maven]
* An Internet connection (Maven has to download all required libraries)

[[validator-gettingstarted-createproject]]
=== Project set up

In order to use Hibernate Validator within a Maven project, simply add the following dependency to
your __pom.xml__:

.Hibernate Validator Maven dependency
====
[source, XML]
[subs="verbatim,attributes"]
----
<dependency>
    <groupId>org.hibernate.validator</groupId>
    <artifactId>hibernate-validator</artifactId>
    <version>{hvVersion}</version>
</dependency>
----
====

This transitively pulls in the dependency to the Bean Validation API
(`javax.validation:validation-api:{bvVersion}`).

[[validator-gettingstarted-uel]]
==== Unified EL

Hibernate Validator requires an implementation of the Unified Expression Language
(http://jcp.org/en/jsr/detail?id=341[JSR 341]) for evaluating dynamic expressions in constraint
violation messages (see <<section-message-interpolation>>). When your application runs in a Java EE
container such as JBoss AS, an EL implementation is already provided by the container. In a Java SE
environment, however, you have to add an implementation as dependency to your POM file. For instance
you can add the following two dependencies to use the JSR 341 http://uel.java.net/[reference
implementation]:

.Maven dependencies for Unified EL reference implementation
====
[source, XML]<commit_msg>Fixing typo and outdated URL<commit_after>[[validator-gettingstarted]]
== Getting started

This chapter will show you how to get started with Hibernate Validator, the reference implementation (RI) of Bean Validation. For the following quick-start you need:

* A JDK 8
* http://maven.apache.org/[Apache Maven]
* An Internet connection (Maven has to download all required libraries)

[[validator-gettingstarted-createproject]]
=== Project set up

In order to use Hibernate Validator within a Maven project, simply add the following dependency to
your __pom.xml__:

.Hibernate Validator Maven dependency
====
[source, XML]
[subs="verbatim,attributes"]
----
<dependency>
    <groupId>org.hibernate.validator</groupId>
    <artifactId>hibernate-validator</artifactId>
    <version>{hvVersion}</version>
</dependency>
----
====

This transitively pulls in the dependency to the Bean Validation API
(`javax.validation:validation-api:{bvVersion}`).

[[validator-gettingstarted-uel]]
==== Unified EL

Hibernate Validator requires an implementation of the Unified Expression Language
(http://jcp.org/en/jsr/detail?id=341[JSR 341]) for evaluating dynamic expressions in constraint
violation messages (see <<section-message-interpolation>>). When your application runs in a Java EE
container such as JBoss AS, an EL implementation is already provided by the container. In a Java SE
environment, however, you have to add an implementation as dependency to your POM file. For instance
you can add the following dependency to use the JSR 341 https://javaee.github.io/uel-ri/[reference
implementation]:

.Maven dependencies for Unified EL reference implementation
====
[source, XML]
{'fraction_non_alphanumeric': 0.09543944427665357, 'fraction_numerical': 0.006040471156750227, 'mean_word_length': 5.320610687022901, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6430177', 'n_tokens_mistral': 931, 'n_tokens_neox': 857, 'n_words': 360}