I have created a custom validator that has a boolean constraint property that is by default true.
When I try and set the value to false in the XML file it never actually gets set to false.
I have tracked this down to the way Ognl converts values. See OgnlOps.convertValue() and OgnlOps.booleanValue(). The string "false" actually converts to a boolean value of true.
I have attached a patch that gets around this. The patch evaluates the string value ONLY if Ognl.isConstant() returns true.
Thanks for the patch. As opposed to putting the fix where you've got it, I put the same basic fix in the OgnlProperyMapping class, as this is where the actual work is done of mapping the constraint to the validator. This fix will be part of the next release.