Validation
There are a two main ways of achieving validation on the server side. One route to follow is through the use of Bean Validation version 1.1 from the Java EE 7 specification, and the other traditional route takes you through JSF validation.
Constraining form content with Bean Validation
Bean Validation is a specification that allows the developers to annotate the POJOs and entity beans and then call a custom validator instance to verify the properties. The validation framework works with Java annotation and thus, the digital engineer can firmly say how a property or even a method is validated.
I devoted an entire chapter to Bean Validation in the Java EE 7 Developer Handbook; nevertheless, I will run through the basics with you here, in this Digital Web Application book. There are several annotations in the Bean Validation 1.1 standard that you can use straightaway. However, if your platform allows or if you decide to add Hibernate Validator, then many more useful validation annotations...