liveBook · Manning

JavaBean Validation API

The JavaBean Validation API is a Java standard for declaring and evaluating constraints on object properties, data, and executable parameters.

How 2 Manning books explain it

Java Persistence with Spring Data and Hibernate epub

Bean Validation is a Java specification for declaring and evaluating constraints on object properties and method parameters.

How it is used
Centralizes domain integrity rules so presentation, business, persistence, and database-facing code can validate consistent data.
How deep it goes
Defines declarative constraints and demonstrates programmatic violation inspection, while deferring exhaustive constraint catalogs and implementation internals.
Examples
Uses Item, User, and Log entities with NotNull and Size constraints, plus a future auction-end date and Validator test.
What you can do after
Apply it via validation annotations and Validator APIs to detect invalid domain objects before persistence.

Read how Java Persistence with Spring Data and Hibernate epub explains JavaBean Validation API →

Spring in Action, Sixth Edition

The Java standard for declaring and evaluating constraints on Java object properties and method parameters, originally specified as JSR 303.

How it is used
Supports declarative validation of Spring MVC form data through constraints on domain objects and controller-triggered checks.
How deep it goes
Explains dependency setup, property annotations, controller integration, messages, and view errors, but defers regular-expression details.
Examples
Uses Taco and TacoOrder fields, delivery addresses, credit-card checks, expiration patterns, CVV digits, and ingredient counts.
What you can do after
Apply it via Spring MVC to declare constraints, trigger validation, and show submitted-form errors.

Read how Spring in Action, Sixth Edition explains JavaBean Validation API →

What to know first

Related concepts

Questions about JavaBean Validation API

What is JavaBean Validation API?

The JavaBean Validation API is a Java standard for declaring and evaluating constraints on object properties, data, and executable parameters.

Which Manning books explain JavaBean Validation API?

Java Persistence with Spring Data and Hibernate epub and Spring in Action, Sixth Edition.

What should I know before learning JavaBean Validation API?

Manning books that teach JavaBean Validation API usually introduce regular expression first.

What is the difference between JavaBean Validation API and JPA XML descriptor?

The JavaBean Validation API is a Java standard for declaring and evaluating constraints on object properties, data, and executable parameters. A JPA XML descriptor is an XML configuration document that defines or overrides persistence mappings for a JPA persistence unit.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.