1

I need to validate the objects of list with Xml configurations. User contains a list of bags.

class User{
private List<Bag> bags = new ArrayList<Bag>();
}

Can't i use instanceOf element within the element to validate the all the Bag properties. Bag has properties like, name, color, etc. I need to validate this while calling Validator.validate(user);

I saw an example with overriding isSatisfied method. But It uses annotaions. I think this can be done with the xml configurations itself.

Greatly appreciate your help.

user2622132
  • 49
  • 1
  • 3
  • 11

0 Answers0