cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <...@apache.org>
Subject [CForms] Validation of non-required fields
Date Thu, 02 Sep 2004 09:47:38 GMT
Dear Cocooners,

am I wrong or the behaviour of validation in 2.2 changed so that it's 
now practically impossible to validate optional fields?

                 <fd:field id="email" required="false">
                         <fd:label>E-mail</fd:label>
                         <fd:datatype base="string">
                                 <fd:validation>
                                         <fd:email/>
                                 </fd:validation>
                         </fd:datatype>
                 </fd:field>

If the field is not filled-in, you get a not-so-nice NPE under 
2.2.0-dev. What I want is to have the validation be performed only if 
the value is not null, and this seems to be impossible now, whereas it 
was possible (IIRC) in 2.1.5.

	Ugo

-- 
Ugo Cei - http://beblogging.com/
Mime
View raw message