thanks,
I eventually got round the problem by doing this:
rules.add((CompoundConstraint) or(new PropertiesConstraint("password", EqualTo.instance(), "oldPassword"), new PropertiesConstraint("password", EqualTo.instance(), "confirmPassword")));
It seems that when you do
Code:
rules.add("password", eqProperty("password", "oldPassword"));
It assumes that "password" is the object that must be checked. But if this was the case then I would have expected an extra method signature in the form of
Code:
public void add(Object, PropertyConstraint)
Does this make sense or am I missing something?