Domain Validation

What's inside a violation?

What's Inside A Violation?

If the validator found a number of violations, what can we do with it? Let's have a look at the simple usages of violation objects.

Validate single, primitive attribute

Learning Test One: Validate a single, primitive attribute

Time to write our first (domain) object and validate something. We'll do this using the TestNG framework to create a tiny test driver showcasing how the most basic validation API calls interact.

Basic Project Setup

Basic Project Setup

I'll use Apache Maven 2.x and IntelliJ IDEA as my primary development tools, so you might want to learn how to use these first if you plan to work through the examples for yourself. All source code and project files for this walkthrough is available from github using

git://github.com/ansgarkonermann/bean-validation-with-jsr303.git

as clone URL.

Syndicate content