You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andreas Hartmann <an...@apache.org> on 2005/01/26 12:48:37 UTC

CForms: Validate

Hi Cocooners,

I would like to validate date fields in a Cocoon form.

My field definition looks as follows:

         <fd:field id="von">
           <fd:label>Von</fd:label>
           <fd:datatype base="date">
             <fd:convertor type="formatting">
               <fd:patterns>
                 <fd:pattern>dd.MM.yyyy</fd:pattern>
               </fd:patterns>
             </fd:convertor>
           </fd:datatype>
         </fd:field>

The problem is that the form field accepts values like

   20.01.200x

which is interpreted as

   20.01.200

and results in the formatted value

   20.01.0200


Is it possible to avoid this behaviour? When I use <fd:javascript>
validation, I can access only the already converted value of the widget,
which is 20.01.200.

Thanks in advance!
-- Andreas


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