# SOME DESCRIPTIVE TITLE.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2013-04-03 09:59+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <kde-i18n-doc@kde.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. Tag: title
#: usingvalidator.xml:24
#, no-c-format
msgid "Declaring and validating constraints"
msgstr ""

#. Tag: para
#: usingvalidator.xml:26
#, no-c-format
msgid "In this chapter we will see in more detail how to use Hibernate Validator to validate constraints for a given entity model. We will also learn which default constraints the Bean Validation specification provides and which additional constraints are only provided by Hibernate Validator. Let's start with how to add constraints to an entity."
msgstr ""

#. Tag: title
#: usingvalidator.xml:33
#, no-c-format
msgid "Defining constraints"
msgstr ""

#. Tag: para
#: usingvalidator.xml:35
#, no-c-format
msgid "Constraints in Bean Validation are expressed via Java annotations. In this section we show how to enhance an object model with these annotations. We have to differentiate between several types of constraint annotations:"
msgstr ""

#. Tag: para
#: usingvalidator.xml:42
#, no-c-format
msgid "field constraints"
msgstr ""

#. Tag: para
#: usingvalidator.xml:46
#, no-c-format
msgid "property constraints"
msgstr ""

#. Tag: para
#: usingvalidator.xml:50
#, no-c-format
msgid "class constraints"
msgstr ""

#. Tag: para
#: usingvalidator.xml:54
#, no-c-format
msgid "method constraints (parameter, cross-parameter and return value constraints)"
msgstr ""

#. Tag: para
#: usingvalidator.xml:60
#, no-c-format
msgid "Not all constraints can be placed on all of these levels. In fact, none of the default constraints defined by Bean Validation can be placed at class level. The <classname>java.lang.annotation.Target</classname> annotation in the constraint annotation itself determines on which elements a constraint can be placed. See <xref linkend=\"validator-customconstraints\"/> for more information."
msgstr ""

#. Tag: title
#: usingvalidator.xml:69
#, no-c-format
msgid "Field-level constraints"
msgstr ""

#. Tag: para
#: usingvalidator.xml:71
#, no-c-format
msgid "Constraints can be expressed by annotating a field of a class. <xref linkend=\"example-field-level\"/> shows a field level configuration example:"
msgstr ""

#. Tag: title
#: usingvalidator.xml:76
#, no-c-format
msgid "Field level constraint"
msgstr ""

#. Tag: programlisting
#: usingvalidator.xml:78
#, no-c-format
msgid ""
      "package com.mycompany;\n"
      "\n"
      "import javax.validation.constraints.NotNull;\n"
      "\n"
      "public class Car {\n"
      "\n"
      "    @NotNull\n"
      "    private String manufacturer;\n"
      "\n"
      "    @AssertTrue\n"
      "    private boolean isRegistered;\n"
      "\n"
      "    public Car(String manufacturer, boolean isRegistered) {\n"
      "        super();\n"
      "        this.manufacturer = manufacturer;\n"
      "        this.isRegistered = isRegistered;\n"
      "    }\n"
      "}"
msgstr ""

#. Tag: para
#: usingvalidator.xml:81
#, no-c-format
msgid "When using field level constraints field access strategy is used to access the value to be validated. This means the bean validation provider directly accesses the instance variable and does not invoke the property accessor method also if such a method exists."
msgstr ""

#. Tag: para
#: usingvalidator.xml:87
#, no-c-format
msgid "The access type (private, protected or public) does not matter."
msgstr ""

#. Tag: para
#: usingvalidator.xml:92
#, no-c-format
msgid "Static fields and properties cannot be validated."
msgstr ""

#. Tag: para
#: usingvalidator.xml:96
#, no-c-format
msgid "When validating byte code enhanced objects property level constraints should be used, because the byte code enhancing library won't be able to determine a field access via reflection."
msgstr ""

#. Tag: title
#: usingvalidator.xml:103
#, no-c-format
msgid "Property-level constraints"
msgstr ""

#. Tag: para
#: usingvalidator.xml:105
#, no-c-format
msgid "If your model class adheres to the <ulink type=\"\" url=\"http://java.sun.com/javase/technologies/desktop/javabeans/index.jsp\">JavaBeans</ulink> standard, it is also possible to annotate the properties of a bean class instead of its fields. <xref linkend=\"example-property-level\"/> uses the same entity as in <xref linkend=\"example-field-level\"/>, however, property level constraints are used."
msgstr ""

#. Tag: para
#: usingvalidator.xml:111
#, no-c-format
msgid "The property's getter method has to be annotated, not its setter."
msgstr ""

#. Tag: title
#: usingvalidator.xml:116
#, no-c-format
msgid "Property level constraint"
msgstr ""

#. Tag: programlisting
#: usingvalidator.xml:118
#, no-c-format
msgid ""
      "package com.mycompany;\n"
      "\n"
      "import javax.validation.constraints.AssertTrue;\n"
      "import javax.validation.constraints.NotNull;\n"
      "\n"
      "public class Car {\n"
      "\n"
      "    private String manufacturer;\n"
      "\n"
      "    private boolean isRegistered;\n"
      "      \n"
      "    public Car(String manufacturer, boolean isRegistered) {\n"
      "        super();\n"
      "        this.manufacturer = manufacturer;\n"
      "        this.isRegistered = isRegistered;\n"
      "    }\n"
      "\n"
      "    @NotNull\n"
      "    public String getManufacturer() {\n"
      "        return manufacturer;\n"
      "    }\n"
      "\n"
      "    public void setManufacturer(String manufacturer) {\n"
      "        this.manufacturer = manufacturer;\n"
      "    }\n"
      "\n"
      "    @AssertTrue\n"
      "    public boolean isRegistered() {\n"
      "        return isRegistered;\n"
      "    }\n"
      "\n"
      "    public void setRegistered(boolean isRegistered) {\n"
      "        this.isRegistered = isRegistered;\n"
      "    }\n"
      "}"
msgstr ""

#. Tag: para
#: usingvalidator.xml:121
#, no-c-format
msgid "When using property level constraints property access strategy is used to access the value to be validated. This means the bean validation provider accesses the state via the property accessor method. One advantage of annotating properties instead of fields is that the constraints become part of the constrained type's API that way and users are aware of the existing constraints without having to examine the type's implementation."
msgstr ""

#. Tag: para
#: usingvalidator.xml:130
#, no-c-format
msgid "It is recommended to stick either to field <emphasis>or</emphasis> property annotations within one class. It is not recommended to annotate a field <emphasis>and</emphasis> the accompanying getter method as this would cause the field to be validated twice."
msgstr ""

#. Tag: title
#: usingvalidator.xml:139
#, no-c-format
msgid "Class-level constraints"
msgstr ""

#. Tag: para
#: usingvalidator.xml:142
#, no-c-format
msgid "Last but not least, a constraint can also be placed on class level. When a constraint annotation is placed on this level the class instance itself passed to the <classname>ConstraintValidator</classname>. Class level constraints are useful if it is necessary to inspect more than a single property of the class to validate it or if a correlation between different state variables has to be evaluated. In <xref linkend=\"example-class-level\"/> we add the property <property>passengers</property> to the class <classname>Car</classname>. We also add the constraint <classname>PassengerCount</classname> on the class level. We will later see how we can actually create this custom constraint (see <xref linkend=\"validator-customconstraints\"/>). For now it is enough to know that <classname>PassengerCount</classname> will ensure that there cannot be more passengers in a car than there are seats."
msgstr ""

#. Tag: title
#: usingvalidator.xml:158
#, no-c-format
msgid "Class level constraint"
msgstr ""

#. Tag: programlisting
#: usingvalidator.xml:160
#, no-c-format
msgid ""
      "package com.mycompany;\n"
      "\n"
      "import javax.validation.constraints.Min;\n"
      "import javax.validation.constraints.NotNull;\n"
      "import javax.validation.constraints.Size;\n"
      "\n"
      "@PassengerCount\n"
      "public class Car {\n"
      "\n"
      "    @NotNull\n"
      "    private String manufacturer;\n"
      "\n"
      "    @NotNull\n"
      "    @Size(min = 2, max = 14)\n"
      "    private String licensePlate;\n"
      "\n"
      "    @Min(2)\n"
      "    private int seatCount;\n"
      "    \n"
      "    private List&lt;Person&gt; passengers;\n"
      "    \n"
      "    public Car(String manufacturer, String licencePlate, int seatCount) {\n"
      "        this.manufacturer = manufacturer;\n"
      "        this.licensePlate = licencePlate;\n"
      "        this.seatCount = seatCount;\n"
      "    }\n"
      "\n"
      "    //getters and setters ...\n"
      "}"
msgstr ""

#. Tag: title
#: usingvalidator.xml:165
#, no-c-format
msgid "Constraint inheritance"
msgstr ""

#. Tag: para
#: usingvalidator.xml:167
#, no-c-format
msgid "When validating an object that implements an interface or extends another class, all constraint annotations on the implemented interface and parent class apply in the same manner as the constraints specified on the validated object itself. To make things clearer let's have a look at the following example:"
msgstr ""

#. Tag: title
#: usingvalidator.xml:174
#, no-c-format
msgid "Constraint inheritance using RentalCar"
msgstr ""

#. Tag: programlisting
#: usingvalidator.xml:176
#, no-c-format
msgid ""
      "package com.mycompany;\n"
      "\n"
      "import javax.validation.constraints.NotNull;\n"
      "\n"
      "public class RentalCar extends Car {\n"
      "\n"
      "    private String rentalStation;\n"
      "    \n"
      "    public RentalCar(String manufacturer, String rentalStation) {\n"
      "        super(manufacturer);\n"
      "        this.rentalStation = rentalStation;\n"
      "    }\n"
      "    \n"
      "    @NotNull\n"
      "    public String getRentalStation() {\n"
      "        return rentalStation;\n"
      "    }\n"
      "\n"
      "    public void setRentalStation(String rentalStation) {\n"
      "        this.rentalStation = rentalStation;\n"
      "    }\n"
      "}"
msgstr ""

#. Tag: para
#: usingvalidator.xml:179
#, no-c-format
msgid "Our well-known class <classname>Car</classname> is now extended by <classname>RentalCar</classname> with the additional property <property>rentalStation</property>. If an instance of <classname>RentalCar</classname> is validated, not only the <classname>@NotNull</classname> constraint on <property>rentalStation</property> is validated, but also the constraint on <property>manufacturer</property> from the parent class."
msgstr ""

#. Tag: para
#: usingvalidator.xml:187
#, no-c-format
msgid "The same would hold true, if <classname>Car</classname> were an interface implemented by <classname>RentalCar</classname>."
msgstr ""

#. Tag: para
#: usingvalidator.xml:190
#, no-c-format
msgid "Constraint annotations are aggregated if methods are overridden. If <classname>RentalCar</classname> would override the <methodname>getManufacturer()</methodname> method from <classname>Car</classname> any constraints annotated at the overriding method would be evaluated in addition to the <classname>@NotNull</classname> constraint from the super-class."
msgstr ""

#. Tag: title
#: usingvalidator.xml:199
#, no-c-format
msgid "Object graphs"
msgstr ""

#. Tag: para
#: usingvalidator.xml:201
#, no-c-format
msgid "The Bean Validation API does not only allow to validate single class instances but also complete object graphs. To do so, just annotate a field or property representing a reference to another object with <classname>@Valid</classname>. If the parent object is validated, all referenced objects annotated with <classname>@Valid</classname> will be validated as well (as will be their children etc.). See <xref linkend=\"example-car-with-driver\"/>."
msgstr ""

#. Tag: title
#: usingvalidator.xml:210
#, no-c-format
msgid "Class Person"
msgstr ""

#. Tag: programlisting
#: usingvalidator.xml:212
#, no-c-format
msgid ""
      "package com.mycompany;\n"
      "\n"
      "import javax.validation.constraints.NotNull;\n"
      "\n"
      "public class Person {\n"
      "\n"
      "    @NotNull\n"
      "    private String name;\n"
      "    \n"
      "    public Person(String name) {\n"
      "        super();\n"
      "        this.name = name;\n"
      "    }\n"
      "\n"
      "    public String getName() {\n"
      "        return name;\n"
      "    }\n"
      "\n"
      "    public void setName(String name) {\n"
      "        this.name = name;\n"
      "    }\n"
      "}"
msgstr ""

#. Tag: title
#: usingvalidator.xml:216
#, no-c-format
msgid "Adding a driver to the car"
msgstr ""

#. Tag: programlisting
#: usingvalidator.xml:218
#, no-c-format
msgid ""
      "package com.mycompany;\n"
      "\n"
      "import javax.validation.Valid;\n"
      "import javax.validation.constraints.NotNull;\n"
      "\n"
      "public class Car {\n"
      "\n"
      "    @NotNull\n"
      "    @Valid\n"
      "    private Person driver;\n"
      "    \n"
      "    public Car(Person driver) {\n"
      "        this.driver = driver;\n"
      "    }\n"
      "\n"
      "    //getters and setters ...\n"
      "}"
msgstr ""

#. Tag: para
#: usingvalidator.xml:221
#, no-c-format
msgid "If an instance of <classname>Car</classname> is validated, the referenced <classname>Person</classname> object will be validated as well, as the <property>driver</property> field is annotated with <classname>@Valid</classname>. Therefore the validation of a <classname>Car</classname> will fail if the <property>name</property> field of the referenced <classname>Person</classname> instance is <code>null</code>."
msgstr ""

#. Tag: para
#: usingvalidator.xml:229
#, no-c-format
msgid "Object graph validation also works for collection-typed fields. That means any attributes that"
msgstr ""

#. Tag: para
#: usingvalidator.xml:234
#, no-c-format
msgid "are arrays"
msgstr ""

#. Tag: para
#: usingvalidator.xml:238
#, no-c-format
msgid "implement <classname>java.lang.Iterable</classname> (especially <classname>Collection</classname>, <classname>List</classname> and <classname>Set</classname>)"
msgstr ""

#. Tag: para
#: usingvalidator.xml:244
#, no-c-format
msgid "implement <classname>java.util.Map</classname>"
msgstr ""

#. Tag: para
#: usingvalidator.xml:248
#, no-c-format
msgid "can be annotated with <classname>@Valid</classname>, which will cause each contained element to be validated, when the parent object is validated."
msgstr ""

#. Tag: title
#: usingvalidator.xml:253
#, no-c-format
msgid "Car with a list of passengers"
msgstr ""

#. Tag: programlisting
#: usingvalidator.xml:255
#, no-c-format
msgid ""
      "package com.mycompany;\n"
      "\n"
      "import java.util.ArrayList;\n"
      "import java.util.List;\n"
      "\n"
      "import javax.validation.Valid;\n"
      "import javax.validation.constraints.NotNull;\n"
      "\n"
      "public class Car {\n"
      "\n"
      "    @NotNull\n"
      "    @Valid\n"
      "    private List&lt;Person&gt; passengers = new ArrayList&lt;Person&gt;();\n"
      "\n"
      "    public Car(List&lt;Person&gt; passengers) {\n"
      "        this.passengers = passengers;\n"
      "    }\n"
      "\n"
      "    //getters and setters ...\n"
      "}"
msgstr ""

#. Tag: para
#: usingvalidator.xml:258
#, no-c-format
msgid "If a <classname>Car</classname> instance is validated, a <classname>ConstraintValidation</classname> will be created, if any of the <classname>Person</classname> objects contained in the <property>passengers</property> list has a <code>null</code> name."
msgstr ""

#. Tag: para
#: usingvalidator.xml:262
#, no-c-format
msgid "<classname>null</classname> values are getting ignored when validating object graphs."
msgstr ""

#. Tag: title
#: usingvalidator.xml:269
#, no-c-format
msgid "Validating constraints"
msgstr ""

#. Tag: para
#: usingvalidator.xml:271
#, no-c-format
msgid "The <classname>Validator</classname> interface is the main entry point to Bean Validation. In <xref linkend=\"section-validator-instance\"/> we will first show how to obtain an <classname>Validator</classname> instance. Afterwards we will learn how to use the different methods of the <classname>Validator</classname> interface."
msgstr ""

#. Tag: title
#: usingvalidator.xml:278
#, no-c-format
msgid "Obtaining a <classname>Validator</classname> instance"
msgstr ""

#. Tag: para
#: usingvalidator.xml:280
#, no-c-format
msgid "The first step towards validating an entity instance is to get hold of a <classname>Validator</classname> instance. The road to this instance leads via the <classname>Validation</classname> class and a <classname>ValidatorFactory</classname>. The easiest way is to use the static <methodname>Validation.buildDefaultValidatorFactory()</methodname> method:"
msgstr ""

#. Tag: title
#: usingvalidator.xml:289
#, no-c-format
msgid "Validation.buildDefaultValidatorFactory()"
msgstr ""

#. Tag: programlisting
#: usingvalidator.xml:291
#, no-c-format
msgid ""
      "ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
      "Validator validator = factory.getValidator();"
msgstr ""

#. Tag: para
#: usingvalidator.xml:294
#, no-c-format
msgid "For other ways of obtaining a Validator instance see <xref linkend=\"validator-bootstrapping\"/>. For now we just want to see how we can use the <classname>Validator</classname> instance to validate entity instances."
msgstr ""

#. Tag: title
#: usingvalidator.xml:301
#, no-c-format
msgid "Validator methods"
msgstr ""

#. Tag: para
#: usingvalidator.xml:303
#, no-c-format
msgid "The <classname>Validator</classname> interface contains three methods that can be used to either validate entire entities or just a single properties of the entity."
msgstr ""

#. Tag: para
#: usingvalidator.xml:307
#, no-c-format
msgid "All three methods return a <classname>Set&lt;ConstraintViolation&gt;</classname>. The set is empty, if the validation succeeds. Otherwise a <classname>ConstraintViolation</classname> instance is added for each violated constraint."
msgstr ""

#. Tag: para
#: usingvalidator.xml:313
#, no-c-format
msgid "All the validation methods have a var-args parameter which can be used to specify, which validation groups shall be considered when performing the validation. If the parameter is not specified the default validation group (<classname>javax.validation.groups.Default</classname>) will be used. We will go into more detail on the topic of validation groups in <xref linkend=\"validator-usingvalidator-validationgroups\"/>"
msgstr ""

#. Tag: methodname
#: usingvalidator.xml:322
#, no-c-format
msgid "validate"
msgstr ""

#. Tag: para
#: usingvalidator.xml:324
#, no-c-format
msgid "Use the <methodname>validate()</methodname> method to perform validation of all constraints of a given entity instance (see <xref linkend=\"example-validator-validate\"/> )."
msgstr ""

#. Tag: title
#: usingvalidator.xml:329
#, no-c-format
msgid "Usage of <methodname>Validator.validate()</methodname>"
msgstr ""

#. Tag: programlisting
#: usingvalidator.xml:332
#, no-c-format
msgid ""
      "ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n"
      "Validator validator = factory.getValidator();\n"
      "\n"
      "Car car = new Car(null);\n"
      "\n"
      "Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations = validator.validate(car);\n"
      "\n"
      "assertEquals(1, constraintViolations.size());\n"
      "assertEquals(\"may not be null\", constraintViolations.iterator().next().getMessage());"
msgstr ""

#. Tag: methodname
#: usingvalidator.xml:337
#, no-c-format
msgid "validateProperty"
msgstr ""

#. Tag: para
#: usingvalidator.xml:339
#, no-c-format
msgid "With help of the <methodname>validateProperty()</methodname> a single named property of a given object can be validated. The property name is the JavaBeans property name."
msgstr ""

#. Tag: title
#: usingvalidator.xml:344
#, no-c-format
msgid "Usage of <methodname>Validator.validateProperty()</methodname>"
msgstr ""

#. Tag: programlisting
#: usingvalidator.xml:347
#, no-c-format
msgid ""
      "Validator validator = Validation.buildDefaultValidatorFactory().getValidator();\n"
      "\n"
      "Car car = new Car(null);\n"
      "\n"
      "Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations = validator.validateProperty(car, \"manufacturer\");\n"
      "\n"
      "assertEquals(1, constraintViolations.size());\n"
      "assertEquals(\"may not be null\", constraintViolations.iterator().next().getMessage());"
msgstr ""

#. Tag: para
#: usingvalidator.xml:350
#, no-c-format
msgid "<methodname>Validator.validateProperty</methodname> is for example used in the integration of Bean Validation into JSF 2 (see <xref linkend=\"section-presentation-layer\"/>)."
msgstr ""

#. Tag: methodname
#: usingvalidator.xml:356
#, no-c-format
msgid "validateValue"
msgstr ""

#. Tag: para
#: usingvalidator.xml:358
#, no-c-format
msgid "Using the <methodname>validateValue() </methodname>method you can check, whether a single property of a given class can be validated successfully, if the property had the specified value:"
msgstr ""

#. Tag: title
#: usingvalidator.xml:363
#, no-c-format
msgid "Usage of <methodname>Validator.validateValue()</methodname>"
msgstr ""

#. Tag: programlisting
#: usingvalidator.xml:366
#, no-c-format
msgid ""
      "Validator validator = Validation.buildDefaultValidatorFactory().getValidator();\n"
      "\n"
      "Set&lt;ConstraintViolation&lt;Car&gt;&gt; constraintViolations = validator.validateValue(Car.class, \"manufacturer\", null);\n"
      "\n"
      "assertEquals(1, constraintViolations.size());\n"
      "assertEquals(\"may not be null\", constraintViolations.iterator().next().getMessage());"
msgstr ""

#. Tag: para
#: usingvalidator.xml:370
#, no-c-format
msgid "<classname>@Valid</classname> is not honored by <methodname>validateProperty()</methodname> or <methodname>validateValue()</methodname>."
msgstr ""

#. Tag: title
#: usingvalidator.xml:378
#, no-c-format
msgid "<classname>ConstraintViolation</classname> methods"
msgstr ""

#. Tag: para
#: usingvalidator.xml:380
#, no-c-format
msgid "Now it is time to have a closer look at what a <classname>ConstraintViolation</classname>. Using the different methods of <classname>ConstraintViolation</classname> a lot of useful information about the cause of the validation failure can be determined. <xref linkend=\"table-constraint-violation\"/> gives an overview of these methods:"
msgstr ""

#. Tag: title
#: usingvalidator.xml:388
#, no-c-format
msgid "The various <classname>ConstraintViolation</classname> methods"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:394
#, no-c-format
msgid "Method"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:396
#, no-c-format
msgid "Usage"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:398
#, no-c-format
msgid "Example (referring to <xref linkend=\"example-validator-validate\"/>)"
msgstr ""

#. Tag: methodname
#: usingvalidator.xml:405
#, no-c-format
msgid "getMessage()"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:407
#, no-c-format
msgid "The interpolated error message."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:409
#, no-c-format
msgid "may not be null"
msgstr ""

#. Tag: methodname
#: usingvalidator.xml:413
#, no-c-format
msgid "getMessageTemplate()"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:415
#, no-c-format
msgid "The non-interpolated error message."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:417
#, no-c-format
msgid "{javax.validation.constraints.NotNull.message}"
msgstr ""

#. Tag: methodname
#: usingvalidator.xml:421
#, no-c-format
msgid "getRootBean()"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:423
#, no-c-format
msgid "The root bean being validated."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:425 usingvalidator.xml:443
#, no-c-format
msgid "<entry>car</entry>"
msgstr ""

#. Tag: methodname
#: usingvalidator.xml:429
#, no-c-format
msgid "getRootBeanClass()"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:431
#, no-c-format
msgid "The class of the root bean being validated."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:433
#, no-c-format
msgid "Car.class"
msgstr ""

#. Tag: methodname
#: usingvalidator.xml:437
#, no-c-format
msgid "getLeafBean()"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:439
#, no-c-format
msgid "If a bean constraint, the bean instance the constraint is applied on. If a property constraint, the bean instance hosting the property the constraint is applied on."
msgstr ""

#. Tag: methodname
#: usingvalidator.xml:447
#, no-c-format
msgid "getPropertyPath()"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:449
#, no-c-format
msgid "The property path to the value from root bean."
msgstr ""

#. Tag: methodname
#: usingvalidator.xml:455
#, no-c-format
msgid "getInvalidValue()"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:457
#, no-c-format
msgid "The value failing to pass the constraint."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:459
#, no-c-format
msgid "passengers"
msgstr ""

#. Tag: methodname
#: usingvalidator.xml:463
#, no-c-format
msgid "getConstraintDescriptor()"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:465
#, no-c-format
msgid "Constraint metadata reported to fail."
msgstr ""

#. Tag: title
#: usingvalidator.xml:475
#, no-c-format
msgid "Message interpolation"
msgstr ""

#. Tag: para
#: usingvalidator.xml:477
#, no-c-format
msgid "As we will see in <xref linkend=\"validator-customconstraints\"/> each constraint definition must define a default message descriptor. This message can be overridden at declaration time using the <methodname>message</methodname> attribute of the constraint. You can see this in <xref linkend=\"example-driver\"/>. This message descriptors get interpolated when a constraint validation fails using the configured <classname>MessageInterpolator</classname>. The interpolator will try to resolve any message parameters, meaning string literals enclosed in braces. In order to resolve these parameters Hibernate Validator's default <classname>MessageInterpolator</classname> first recursively resolves parameters against a custom <classname>ResourceBundle</classname> called <filename>ValidationMessages.properties</filename> at the root of the classpath (It is up to you to create this file). If no further replacements are possible against the custom bundle the default <classname>ResourceBundle</classname> under <filename>/org/hibernate/validator/ValidationMessages.properties</filename> gets evaluated. If a replacement occurs against the default bundle the algorithm looks again at the custom bundle (and so on). Once no further replacements against these two resource bundles are possible remaining parameters are getting resolved against the attributes of the constraint to be validated."
msgstr ""

#. Tag: para
#: usingvalidator.xml:500
#, no-c-format
msgid "Since the braces { and } have special meaning in the messages they need to be escaped if they are used literally. The following The following rules apply:"
msgstr ""

#. Tag: para
#: usingvalidator.xml:504
#, no-c-format
msgid "\\{ is considered as the literal {"
msgstr ""

#. Tag: para
#: usingvalidator.xml:508
#, no-c-format
msgid "\\} is considered as the literal }"
msgstr ""

#. Tag: para
#: usingvalidator.xml:512
#, no-c-format
msgid "\\\\ is considered as the literal \\"
msgstr ""

#. Tag: para
#: usingvalidator.xml:516
#, no-c-format
msgid "If the default message interpolator does not fit your requirements it is possible to plug a custom <classname>MessageInterpolator</classname> when the <classname>ValidatorFactory</classname> gets created. This can be seen in <xref linkend=\"validator-bootstrapping\"/>."
msgstr ""

#. Tag: title
#: usingvalidator.xml:525
#, no-c-format
msgid "Built-in constraints"
msgstr ""

#. Tag: para
#: usingvalidator.xml:527
#, no-c-format
msgid "Hibernate Validator comprises a basic set of commonly used constraints. These are foremost the constraints defined by the Bean Validation specification (see <xref linkend=\"table-spec-constraints\"/>). Additionally, Hibernate Validator provides useful custom constraints (see <xref linkend=\"table-custom-constraints\"/> and <xref linkend=\"table-custom-country-constraints\"/>)."
msgstr ""

#. Tag: title
#: usingvalidator.xml:535 usingvalidator.xml:554
#, no-c-format
msgid "Bean Validation constraints"
msgstr ""

#. Tag: para
#: usingvalidator.xml:537
#, no-c-format
msgid "shows purpose and supported data types of all constraints specified in the Bean Validation API. All these constraints apply to the field/property level, there are no class-level constraints defined in the Bean Validation specification. If you are using the Hibernate object-relational mapper, some of the constraints are taken into account when creating the DDL for your model (see column \"Hibernate metadata impact\")."
msgstr ""

#. Tag: para
#: usingvalidator.xml:546
#, no-c-format
msgid "Hibernate Validator allows some constraints to be applied to more data types than required by the Bean Validation specification (e.g. @Max can be applied to <classname>Strings</classname>). Relying on this feature can impact portability of your application between Bean Validation providers."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:567 usingvalidator.xml:827 usingvalidator.xml:1025
#, no-c-format
msgid "Annotation"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:569 usingvalidator.xml:829 usingvalidator.xml:1027
#, no-c-format
msgid "Supported data types"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:571 usingvalidator.xml:831 usingvalidator.xml:1029
#, no-c-format
msgid "<entry>Use</entry>"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:573 usingvalidator.xml:833 usingvalidator.xml:1033
#, no-c-format
msgid "Hibernate metadata impact"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:579
#, no-c-format
msgid "@AssertFalse"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:581 usingvalidator.xml:593
#, no-c-format
msgid "<classname>Boolean</classname>, <classname>boolean</classname>"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:584
#, no-c-format
msgid "Checks that the annotated element is <constant>false</constant>."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:587 usingvalidator.xml:599 usingvalidator.xml:619 usingvalidator.xml:639 usingvalidator.xml:675 usingvalidator.xml:733 usingvalidator.xml:749 usingvalidator.xml:762 usingvalidator.xml:789 usingvalidator.xml:849 usingvalidator.xml:863 usingvalidator.xml:900 usingvalidator.xml:913 usingvalidator.xml:926 usingvalidator.xml:942 usingvalidator.xml:959 usingvalidator.xml:976 usingvalidator.xml:994 usingvalidator.xml:1049 usingvalidator.xml:1063 usingvalidator.xml:1078
#, no-c-format
msgid "none"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:591
#, no-c-format
msgid "@AssertTrue"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:596
#, no-c-format
msgid "Checks that the annotated element is <constant>true</constant>."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:603
#, no-c-format
msgid "@DecimalMax"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:605 usingvalidator.xml:645
#, no-c-format
msgid "<classname>BigDecimal</classname>, <classname>BigInteger</classname>, <classname>String</classname>, <classname>byte</classname>, <classname>short</classname>, <classname>int</classname>, <classname>long</classname> and the respective wrappers of the primitive types. Additionally supported by HV: any sub-type of <classname>Number</classname> and <classname>CharSequence</classname>."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:614
#, no-c-format
msgid "The annotated element must be a number whose value must be lower or equal to the specified maximum. The parameter value is the string representation of the max value according to the <classname>BigDecimal</classname> string representation."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:623
#, no-c-format
msgid "@DecimalMin"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:625
#, no-c-format
msgid "<classname>BigDecimal</classname>, <classname>BigInteger</classname>, <classname>String</classname>, <classname>byte</classname>, <classname>short</classname>, <classname>int</classname>, <classname>long</classname> and the respective wrappers of the primitive types. Additionally supported by HV: any sub-type of <classname>Number </classname>and <classname>CharSequence</classname>."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:634
#, no-c-format
msgid "The annotated element must be a number whose value must be higher or equal to the specified minimum. The parameter value is the string representation of the min value according to the <classname>BigDecimal</classname> string representation."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:643
#, no-c-format
msgid "@Digits(integer=, fraction=)"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:654
#, no-c-format
msgid "Checks whether the annoted value is a number having up to <literal>integer</literal> digits and <literal>fraction</literal> fractional digits."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:658
#, no-c-format
msgid "Define column precision and scale."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:662
#, no-c-format
msgid "@Future"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:664 usingvalidator.xml:739
#, no-c-format
msgid "<classname>java.util.Date</classname>, <classname>java.util.Calendar</classname>; Additionally supported by HV, if the <ulink url=\"http://joda-time.sourceforge.net/\">Joda Time</ulink> date/time API is on the class path: any implementations of <classname>ReadablePartial</classname> and <classname>ReadableInstant</classname>."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:672
#, no-c-format
msgid "Checks whether the annotated date is in the future."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:679
#, no-c-format
msgid "@Max"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:681
#, no-c-format
msgid "<classname>BigDecimal</classname>, <classname>BigInteger</classname>, <classname>byte</classname>, <classname>short</classname>, <classname>int</classname>, <classname>long</classname> and the respective wrappers of the primitive types. Additionally supported by HV: any sub-type of<classname>CharSequence</classname> (the numeric value represented by the character sequence is evaluated), any sub-type of <classname>Number</classname>."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:690
#, no-c-format
msgid "Checks whether the annotated value is less than or equal to the specified maximum."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:693 usingvalidator.xml:711
#, no-c-format
msgid "Add a check constraint on the column."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:697
#, no-c-format
msgid "@Min"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:699
#, no-c-format
msgid "<classname>BigDecimal</classname>, <classname>BigInteger</classname>, <classname>byte</classname>, <classname>short</classname>, <classname>int</classname>, <classname>long</classname> and the respective wrappers of the primitive types. Additionally supported by HV: any sub-type of <classname>CharSequence</classname> (the numeric value represented by the char sequence is evaluated), any sub-type of <classname>Number</classname>."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:708
#, no-c-format
msgid "Checks whether the annotated value is higher than or equal to the specified minimum."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:715
#, no-c-format
msgid "@NotNull"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:717 usingvalidator.xml:728 usingvalidator.xml:965
#, no-c-format
msgid "Any type"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:719
#, no-c-format
msgid "Checks that the annotated value is not <constant>null.</constant>"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:722
#, no-c-format
msgid "Column(s) are not null."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:726
#, no-c-format
msgid "@Null"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:730
#, no-c-format
msgid "Checks that the annotated value is <constant>null.</constant>"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:737
#, no-c-format
msgid "@Past"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:747
#, no-c-format
msgid "Checks whether the annotated date is in the past."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:753
#, no-c-format
msgid "@Pattern(regex=, flag=)"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:755
#, no-c-format
msgid "<classname>String</classname>. Additionally supported by HV: any sub-type of <classname>CharSequence</classname>."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:758
#, no-c-format
msgid "Checks if the annotated string matches the regular expression <parameter>regex</parameter> considering the given flag <parameter>match</parameter>."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:766
#, no-c-format
msgid "@Size(min=, max=)"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:768
#, no-c-format
msgid "<classname>String</classname>, <classname>Collection</classname>, <classname>Map</classname> and <classname>arrays</classname>. Additionally supported by HV: any sub-type of <classname>CharSequence</classname>."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:773
#, no-c-format
msgid "Checks if the annotated element's size is between min and max (inclusive)."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:776 usingvalidator.xml:875
#, no-c-format
msgid "Column length will be set to max."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:780
#, no-c-format
msgid "@Valid"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:782
#, no-c-format
msgid "Any non-primitive type"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:784
#, no-c-format
msgid "Performs validation recursively on the associated object. If the object is a collection or an array, the elements are validated recursively. If the object is a map, the value elements are validated recursively."
msgstr ""

#. Tag: para
#: usingvalidator.xml:796
#, no-c-format
msgid "On top of the parameters indicated in <xref linkend=\"table-spec-constraints\"/> each constraint supports the parameters <parameter>message</parameter>, <parameter>groups</parameter> and <parameter>payload</parameter>. This is a requirement of the Bean Validation specification."
msgstr ""

#. Tag: title
#: usingvalidator.xml:805
#, no-c-format
msgid "Additional constraints"
msgstr ""

#. Tag: para
#: usingvalidator.xml:807
#, no-c-format
msgid "In addition to the constraints defined by the Bean Validation API Hibernate Validator provides several useful custom constraints which are listed in <xref linkend=\"table-custom-constraints\"/>. With one exception also these constraints apply to the field/property level, only @ScriptAssert is a class-level constraint."
msgstr ""

#. Tag: title
#: usingvalidator.xml:814
#, no-c-format
msgid "Custom constraints"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:839
#, no-c-format
msgid "@CreditCardNumber"
msgstr ""

#. Tag: classname
#: usingvalidator.xml:841 usingvalidator.xml:855 usingvalidator.xml:869 usingvalidator.xml:882 usingvalidator.xml:906 usingvalidator.xml:948 usingvalidator.xml:982 usingvalidator.xml:1041 usingvalidator.xml:1055 usingvalidator.xml:1069
#, no-c-format
msgid "CharSequence"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:843
#, no-c-format
msgid "Checks that the annotated character sequence passes the Luhn checksum test. Note, this validation aims to check for user mistakes, not credit card validity! See also <ulink url=\"http://www.merriampark.com/anatomycc.htm\">Anatomy of Credit Card Numbers</ulink>."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:853
#, no-c-format
msgid "@Email"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:857
#, no-c-format
msgid "Checks whether the specified character sequence is a valid email address. The optional parameters <parameter>regexp</parameter> and <parameter>flags</parameter> allow to specify an additional regular expression (including regular expression flags) which the email must match."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:867
#, no-c-format
msgid "@Length(min=, max=)"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:871
#, no-c-format
msgid "Validates that the annotated character sequence is between <parameter>min</parameter> and <parameter>max</parameter> included."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:879
#, no-c-format
msgid "@ModCheck(modType=, multiplier=, startIndex=, endIndex=, checkDigitPosition=, ignoreNonDigitCharacters=)"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:884
#, no-c-format
msgid "Checks that the digits within the annotated character sequence pass the mod 10 or mod 11 checksum algorithm. <constant>modType</constant> is used to select the modulo type and the <constant>multiplier</constant> determines the algorithm specific multiplier (see also <ulink url=\"http://en.wikipedia.org/wiki/Luhn_algorithm\">Luhn algorithm</ulink>). <constant>startIndex</constant> and <constant>endIndex</constant> allow to only run the modulo algorithm on the specified sub-string. <constant>checkDigitPosition</constant> allows to use an arbitrary digit within the character sequence to be the check digit. If not specified it is assumed that the check digit is part of the specified range. Last but not least, <constant>ignoreNonDigitCharacters</constant> allows to ignore non digit characters."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:904
#, no-c-format
msgid "@NotBlank"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:908
#, no-c-format
msgid "Checks that the annotated character sequence is not null and the trimmed length is greater than 0. The difference to @NotEmpty is that this constraint can only be applied on strings and that trailing whitespaces are ignored."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:917
#, no-c-format
msgid "@NotEmpty"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:919
#, no-c-format
msgid "<classname>CharSequence</classname>, <classname>Collection</classname>, <classname>Map</classname> and arrays"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:923
#, no-c-format
msgid "Checks whether the annotated element is not <constant>null</constant> nor empty."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:930
#, no-c-format
msgid "@Range(min=, max=)"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:932
#, no-c-format
msgid "<classname>BigDecimal</classname>, <classname>BigInteger</classname>, <classname>CharSequence</classname>, <classname>byte</classname>, <classname>short</classname>, <classname>int</classname>, <classname>long</classname> and the respective wrappers of the primitive types"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:939
#, no-c-format
msgid "Checks whether the annotated value lies between (inclusive) the specified minimum and maximum."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:946
#, no-c-format
msgid "@SafeHtml(whitelistType=, additionalTags=)"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:950
#, no-c-format
msgid "Checks whether the annotated value contains potentially malicious fragments such as <code>&lt;script/&gt;</code>. In order to use this constraint, the <ulink url=\"http://jsoup.org/\">jsoup</ulink> library must be part of the class path. With the <parameter>whitelistType</parameter> attribute predefined whitelist types can be chosen. You can also specify additional html tags for the whitelist with the <parameter>additionalTags</parameter> attribute."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:963
#, no-c-format
msgid "@ScriptAssert(lang=, script=, alias=)"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:967
#, no-c-format
msgid "Checks whether the given script can successfully be evaluated against the annotated element. In order to use this constraint, an implementation of the Java Scripting API as defined by JSR 223 (\"Scripting for the Java<superscript>TM</superscript> Platform\") must part of the class path. The expressions to be evaluated can be written in any scripting or expression language, for which a JSR 223 compatible engine can be found in the class path."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:980
#, no-c-format
msgid "@URL(protocol=, host=, port=, regexp=, flags=)"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:984
#, no-c-format
msgid "Checks if the annotated character sequence is a valid URL according to RFC2396. If any of the optional parameters <parameter>protocol</parameter>, <parameter>host</parameter> or <parameter>port</parameter> are specified, the corresponding URL fragments must match the specified values. The optional parameters <parameter>regexp</parameter> and <parameter>flags</parameter> allow to specify an additional regular expression (including regular expression flags) which the URL must match."
msgstr ""

#. Tag: title
#: usingvalidator.xml:1001
#, no-c-format
msgid "Country specific constraints"
msgstr ""

#. Tag: para
#: usingvalidator.xml:1003
#, no-c-format
msgid "Hibernate Validator offers also some country specific constraints, e.g. for the validation of social security numbers."
msgstr ""

#. Tag: para
#: usingvalidator.xml:1005
#, no-c-format
msgid "If you have to implement a country specific constraint, consider making it a contribution to Hibernate Validator!"
msgstr ""

#. Tag: title
#: usingvalidator.xml:1010
#, no-c-format
msgid "Custom country specific constraints"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:1031
#, no-c-format
msgid "Country"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:1039
#, no-c-format
msgid "@CNPJ"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:1043
#, no-c-format
msgid "Checks that the annotated character sequence represents a Brazilian corporate tax payer registry number (Cadastro de Pessoa Juríeddica)"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:1047 usingvalidator.xml:1061 usingvalidator.xml:1076
#, no-c-format
msgid "Brazil"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:1053
#, no-c-format
msgid "@CPF"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:1057
#, no-c-format
msgid "Checks that the annotated character sequence represents a Brazilian individual taxpayer registry number (Cadastro de Pessoa Fídsica)."
msgstr ""

#. Tag: entry
#: usingvalidator.xml:1067
#, no-c-format
msgid "@TituloEleitoral"
msgstr ""

#. Tag: entry
#: usingvalidator.xml:1071
#, no-c-format
msgid "Checks that the annotated character sequence represents a Brazilian voter ID card number (<ulink url=\"http://ghiorzi.org/cgcancpf.htm\">Título Eleitoral</ulink>)."
msgstr ""

#. Tag: para
#: usingvalidator.xml:1085
#, no-c-format
msgid "In some cases neither the Bean Validation constraints nor the custom constraints provided by Hibernate Validator will fulfill your requirements. In this case you can easily write your own constraint. We will discuss this in <xref linkend=\"validator-customconstraints\"/>."
msgstr ""

