Java Bean Validation—JSR-303 is a framework that has been approved by the JCP (Java Community Process) and is accepted as a part of the Java EE 6 specification. Through this framework, we can easily add validation on the attributes in the bean. In this recipe, we will create a form for the
Product bean and we will validate the attributes.
Before we start with bean validation, we need to download a Bean Validation implementation and add it to our project. For example, one of them is available at the following URL:
Alternatively, we can download the Hibernate ...