I currently study how to use CompoundPropertyConstraint but with little result.
I expect the rule which ensure at least one of companyAddress and companyHomePage should be required.I hope the following codes works.but it does not work well.
Besides,I try RequiredIfOthersPresent like this:
PropertyValueConstraint companyAddress = new PropertyValueConstraint(
PropertyValueConstraint companyHomePage = new PropertyValueConstraint(
CompoundPropertyConstraint compund = new CompoundPropertyConstraint(new Or(companyHomePage,companyAddress));
It does not work as the doc says. anything wrong with my way to use?