Hibernate.orgCommunity Documentation

Hibernate Validator

JSR 303 Reference Implementation

Reference Guide


Preface
1. Getting started
1.1. Setting up a new Maven project
1.2. Applying constraints
1.3. Validating constraints
1.4. Where to go next?
2. Validation step by step
2.1. Defining constraints
2.1.1. Field-level constraints
2.1.2. Property-level constraints
2.1.3. Class-level constraints
2.1.4. Constraint inheritance
2.1.5. Object graphs
2.2. Validating constraints
2.2.1. Obtaining a Validator instance
2.2.2. Validator methods
2.2.3. ConstraintViolation methods
2.2.4. Message interpolation
2.3. Validating groups
2.3.1. Group sequences
2.3.2. Redefining the default group sequence of a class
2.4. Built-in constraints
2.4.1. Bean Validation constraints
2.4.2. Additional constraints
3. Creating custom constraints
3.1. Creating a simple constraint
3.1.1. The constraint annotation
3.1.2. The constraint validator
3.1.3. The error message
3.1.4. Using the constraint
3.2. Constraint composition
4. XML configuration
4.1. validation.xml
4.2. Mapping constraints
5. Bootstrapping
5.1. Configuration and ValidatorFactory
5.2. ValidationProviderResolver
5.3. MessageInterpolator
5.3.1. ResourceBundleLocator
5.4. TraversableResolver
5.5. ConstraintValidatorFactory
6. Metadata API
6.1. BeanDescriptor
6.2. PropertyDescriptor
6.3. ElementDescriptor
6.4. ConstraintDescriptor
7. Integration with other frameworks
7.1. OSGi
7.2. Database schema-level validation
7.3. ORM integration
7.3.1. Hibernate event-based validation
7.3.2. JPA
7.4. Presentation layer validation
8. Hibernate Validator Specifics
8.1. Public API
8.2. Fail fast mode
8.3. Method validation
8.3.1. Defining method-level constraints
8.3.2. Evaluating method-level constraints
8.3.3. Retrieving method-level constraint meta data
8.4. Programmatic constraint definition
8.5. Boolean composition for constraint composition
9. Annotation Processor
9.1. Prerequisites
9.2. Features
9.3. Options
9.4. Using the Annotation Processor
9.4.1. Command line builds
9.4.2. IDE builds
9.5. Known issues
10. Further reading