Olivier Billard wrote:

Hi all, Hi Sylvain,


Hi Olivier!

Your post makes me wonder if it is possible to do validation of a field (any type of validation) depending of another field value, or "conditionize" the requirement of a field depending on another field value :

Exemple :
- boolean field "recall" : true/false
- field "number of recalls" : required if recall is true and ranges from 1 to n


is it possible to do so ?


What about using the "assert" validator? Of course, you'll have to write a boolean condition rather than just using the attributes provided by the "range" validator.

For the moment,I set "number of recalls" field required with a default value of 1, but display the field only if recall is true (hidden otherwise)... and deal with its requirement later in business code... but if woody could do this, it would be cool.


Well, seems it already does it ;-)

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com




Reply via email to