I have had an opportunity to play around with annotation and hibernate validation. Basically, hibernate has a few predefined annotations that you can use to annotate your getter methods. Later on, when in comes the user input, it will be validated based on the annotation type you use. For example -
@Length(max = 100)
@Email
public String getEmail() {
return email;
}
Here we are [...]