Bean Validation Tutorial will guide you through standard validation specification for Java. You will learn how to define constraints on beans, test them, create custom constraints, and many more. All topics covered with practical examples.
Bean Validation is:
- API specification (JSR-303 – 1.0, JSR-349 – 1.1)
- Part of Java Enterprise Edition
- Can be used in Java SE
- defined in javax.validation package
- Has two implementations: Hibernate Validator (reference implementation), and Apache BVal.
Bean Validation Tutorial
- Bean Validation example
Shows how to setup project dependencies (with Hibernate Validator as implementation), instantiation of Validator and how to run validation. A great place to start!
- Bean Validation in Unit Tests
How to check Bean Validation constraints in unit tests with examples in JUnit!
- Bean Validation built-in constraints
Examples with validation constraints that ship with javax.validation package.
- Bean Validation specification (version 1.1)