Processing, storing, and retrieving valid data is crucial for an application, that's why validation is a common task that needs to be done in several layers of your application. In this course you will learn how Bean Validation allows developers to write constraints in a standard way and apply them everywhere (bean, properties, constructors, method parameters, and return value). You will also see how Bean Validation can be integrated in other Java EE specifications.
Course Overview Hi everyone. My name is Antonio Goncalves. Welcome to my course Bean Validation 1. 1. I am an independent developer, a book author, and a recognized Java Champion. I'm also part of the Java EE Expert Group and like to speak at international technical conferences. So, if you know Java EE or Spring and you need to better validate your data, this course is for you. In this course, you will learn Bean Validation, the Java EE specification allowing you to constrain your data. Some of the major topics that I will cover include understanding Bean Validation and its advantages over validating programmatically, how to use built-in constraints in your code, as well as defining your own constraints. You will be able to apply constraints everywhere on attributes, classes, methods, and constructors. You will also learn a few advanced topics such as dealing with error messages or grouping constraints together. Finally, you'll learn how to put all these pieces together inside or outside Java EE so you can bring Bean Validation to your projects. By the end of this course, you'll have a very good understanding of which data you can validate and constrain with Bean Validation. Before beginning the course, you should be familiar with the Java programming language. This course will guide you step by step in using constrains in most of your business rules. I hope you'll join me on this journey to learn data validation with Bean Validation 1. 1 course at Pluralsight.
Understanding Bean Validation Hi. My name is Antonio Goncalves, and I want to welcome you to this module about Understanding Bean Validation. I will use this second module to show you what Bean Validation is and what it's not. In this module, I will recap what validation is and in which layers of our application we usually validate data. Once you have understood how we usually validate data, then I will introduce Bean Validation, tell you what it is, what it does, but also what it's not. Bean Validation comes with built-in constraints, but you can easily create your own within Java SE, but also in Java EE.
Validating Built-in Constraints Hi. My name is Antonio Goncalves, and I want to welcome you to this module about Bean Validation Built-in Constraints and how we validate them. In this module, I will show you what are the common constraints that are bundled with Bean Validation. Constraints are annotation that we use at development time. On the other hand, validation happens on the runtime and uses a set of API to achieve this. I will then show you how to use all these in Java SE and with unit tests.
Defining our own Constraints Hi. My name is Antonio Goncalves, and I want to welcome you to this fourth module that explains how to define your own constraints with Bean Validation. Bean Validation provides standard built-in constraints such as null, not null, max, min, but they cannot meet all our application needs. Therefore, the API allows us to build our own business constraints easily with annotations. Then there are several ways to implement the validation algorithm either by aggregating existing constraints or writing one entirely from scratch.
Messages, Groups and Payloads Hi. My name is Antonio Goncalves, and I want to welcome you to this fifth module that goes further into defining and customizing your own constraints with Bean Validation. In both cases of constraint composition and generated constraints you can customize error messages. They can be hard coded, use resource bundles, and be internationalized. Partial validation can be achieved by defining groups and validating certain groups. Payloads will wrap up this module.
Advanced Topics Hi. My name is Antonio Goncalves, and I want to welcome you to this module that covers some Bean Validation Advanced Topics. In this module, you will learn how to add multiple constraints on the same target. So far we've seen outer constraint attributes, but with Bean Validation we can also constrain classes or methods and even trigger this validation automatically. On top of validating an entire bean, we can also validate single properties or even values. Then we will see how to deal with constraint inheritance, and we'll finish this module with XML configuration.
Bean Validation 1.1 within Java EE 7 Hi. My name is Antonio Goncalves, and I want to welcome you to this last module that covers integration between Bean Validation 1. 1 and Java EE 7. In this module, I will give you a very quick overview of Java EE 7 trying to focus on the services given by the Java EE container to Bean Validation. You will see how Bean Validation is deeply integrated with some specifications such as context and dependency injection, Java Server Faces, Enterprise Java Beans, Java Persistence APA, and REST's Web Services. I will finish this module with a summary of the course and will give you some extra pointers for external references.