Java Validation using Annotations
Validation in Java can be done nicely using annotations. Simply define annotations for your business rules then for each field you want to validate, simply annotate it with something and leave the validator to do the rest. Let’s consider a class that models a phone bill. I want to validate it using these 3 rules: … Read more