A boolean condition on the assert validator instead of a range validator suits me well, but to play the devil's advocate ;), what about more complex validations, such email ? No way for the moment ?
It would be very interesting !
-- Olivier
PS : also about woody, I had another question about validation on users' ;) : http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=107340459803769&w=2
On 07/01/2004 18:26, Sylvain Wallez wrote:
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
