Hibernate Validator 5.4.3.Final - JSR 349 Reference Implementation Reference Guide

Hibernate Validator 5.4.3.Final - JSR 349 Reference Implementation Reference Guide

Hibernate Validator 5.4.3.Final - JSR 349 Reference Implementation Reference Guide Hardy Ferentschik, Gunnar Morling 2019-02-03 Table of Contents Preface . 1 1. Getting started. 3 1.1. Project set up . 3 1.2. Applying constraints. 6 1.3. Validating constraints. 7 1.4. Java 8 support . 9 1.5. Where to go next? . 9 2. Declaring and validating bean constraints . 11 2.1. Declaring bean constraints . 11 2.2. Validating bean constraints . 21 2.3. Built-in constraints . 25 3. Declaring and validating method constraints . 36 3.1. Declaring method constraints . 36 3.2. Validating method constraints. 45 3.3. Built-in method constraints . 51 4. Interpolating constraint error messages . 52 4.1. Default message interpolation . 52 4.2. Custom message interpolation . 57 5. Grouping constraints . 60 5.1. Requesting groups . 60 5.2. Group inheritance . 65 5.3. Defining group sequences . 66 5.4. Redefining the default group sequence . 67 5.5. Group conversion . 70 6. Creating custom constraints . 74 6.1. Creating a simple constraint . 74 6.2. Class-level constraints . 82 6.3. Cross-parameter constraints . 84 6.4. Constraint composition . 87 7. Configuring via XML . 90 7.1. Configuring the validator factory in validation.xml . 90 7.2. Mapping constraints via constraint-mappings . 93 8. Bootstrapping . 100 8.1. Retrieving ValidatorFactory and Validator . 100 8.2. Configuring a ValidatorFactory . 102 8.3. Configuring a Validator. 108 9. Using constraint metadata . 109 9.1. BeanDescriptor . 110 9.2. PropertyDescriptor . 113 9.3. MethodDescriptor and ConstructorDescriptor . 114 9.4. ElementDescriptor . 116 9.5. GroupConversionDescriptor . 119 9.6. ConstraintDescriptor . 119 10. Integrating with other frameworks . 121 10.1. ORM integration . 121 10.2. JSF & Seam. 123 10.3. CDI . 124 10.4. Java EE. 132 10.5. JavaFX . 132 11. Hibernate Validator Specifics . 133 11.1. Public API . 133 11.2. Fail fast mode . 135 11.3. Relaxation of requirements for method validation in class hierarchies . 136 11.4. Programmatic constraint definition and declaration . 137 11.5. Applying programmatic constraint declarations to the default validator factory . 141 11.6. Advanced constraint composition features . 141 11.7. Extensions of the Path API . 143 11.8. Dynamic payload as part of ConstraintViolation . 144 11.9. ParameterMessageInterpolator . ..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    167 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us