I am not binding parameters to objects in this case, so I have an action method like
public static void foo(@Required String name){ // would add new Error with key 'name'
Person person=new Person(name);
validation.valid(person); // I have another validation in the Person class, so this would add error with key 'person.name'
validation.valid(null, person) would add error with key 'null.name' which makes no sense anyway
I want the ability to unite the two validation approaches easily
I am not binding parameters to objects in this case, so I have an action method like valid(person) ; // I have another validation in the Person class, so this would add error with key 'person.name' valid(null, person) would add error with key 'null.name' which makes no sense anyway
public static void foo(@Required String name){ // would add new Error with key 'name'
Person person=new Person(name);
validation.
validation.
I want the ability to unite the two validation approaches easily