Generic Bean: simple validation

In my previous post i write about a generic base bean to be extended in concrete classes. In a recent application i needed some simple validation rules to mantain the object in a consistent state, so i decided to add a couple of custom attributes to properties:

  • min: min lenght for string or min value for numeric;
  • max: max lenght for string or max value for numeric

I also added a generic validation method to the base class.

New code and sample can be downloaded from here.

Lascia un commento