cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Curran <daniel.cur...@dotech.com>
Subject Null values with fd:assert
Date Tue, 09 May 2006 16:20:30 GMT
I have two dates defined as:

<fd:field id="startdate">
    <fd:label>Start Date</fd:label>
    <fd:datatype base="date">
       <fd:convertor type="formatting">
          <fd:patterns>
             <fd:pattern>MM/dd/yyyy</fd:pattern>
          </fd:patterns>
       </fd:convertor>
    </fd:datatype>
</fd:field>

<fd:field id="enddate">
    <fd:label>End Date</fd:label>
    <fd:datatype base="date">
       <fd:convertor type="formatting">
          <fd:patterns>
             <fd:pattern>MM/dd/yyyy</fd:pattern>
          </fd:patterns>
       </fd:convertor>
    </fd:datatype>
    <fd:validation>
       <fd:assert test="enddate &gt; startdate">
          <fd:failmessage>End date must be greater than the Start 
date</fd:failmessage>
       </fd:assert>
    </fd:validation>
</fd:field>

When I set an end date, but leave the start date null I get an error 
_Error evaluating expression on assert validation rule._

I would like the test to pass if either or both fields values are null.

Does anyone know how this would be accomplished? I am also interested in 
documentation of the types of rules that can be used, where should I 
look for this?

Thanks,
Dan Curran


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message