-> -----Mensagem original----- -> De: Joerg Heinicke [mailto:[EMAIL PROTECTED] -> Enviada: quinta-feira, 13 de Maio de 2004 00:42 -> Para: [EMAIL PROTECTED] -> Assunto: Re: cforms validation bug? -> -> On 12.05.2004 00:53, Isidro Vila Verde wrote: -> -> > <fd:multivaluefield id="drinks"> -> > <fd:label>Indicate which 2 of the following drinks -> you'd like to -> > receive:</fd:label> -> > <fd:datatype base="string"/> -> > <fd:validation> -> > <!--fd:value-count exact="2"/--> <!-- WON'T -> VALIDATE ANY FIELD -> > --> -> > </fd:validation> -> > <fd:selection-list> -> > <fd:item value="Maes"/> -> > <fd:item value="Jupiler"/> -> > <fd:item value="Leffe"/> -> > <fd:item value="Hoegaarden"/> -> > <fd:item value="Coca Cola"/> -> > </fd:selection-list> -> > </fd:multivaluefield> -> -> Shall this mean with an empty <fd:validation> you can break -> the validation in the complete form? Or is the error bound -> to some specific use case?
Not exactly. It means without a <fd:value-count> it break the validation in the complete form. If I comment out the <fd:validation> node it won't work also. <!--fd:validation> <fd:value-count exact="2"/> </fd:validation--> I experiment that problem with form1 example provide with coocon and with my own code. I have a small form definition where I need to include a dummy multivaluefield widget, with a <fd:value-count>, just to validation work. Here you have my form definition. <?xml version="1.0" encoding="iso-8859-1"?> <fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" xmlns:i18n="http://apache.org/cocoon/i18n/2.1"> <fd:widgets> <fd:multivaluefield id="dummy"> <!-- ONLY FOR VALIDATION MECHANISM WORKS --> <fd:label>label</fd:label> <fd:datatype base="string"/> <fd:validation> <fd:value-count exact="2"/> </fd:validation> <fd:selection-list> <fd:item value="Maes"/> </fd:selection-list> </fd:multivaluefield> <fd:field id="email" required="true"> <fd:help>Your email </fd:help> <fd:hint>Email that you had used to register</fd:hint> <fd:label>Email</fd:label> <fd:datatype base="string"/> <fd:validation> <fd:email/> </fd:validation> </fd:field> <fd:field id="password" required="true"> <fd:label>Password</fd:label> <fd:datatype base="string"/> <fd:validation> <fd:length min="6"> <fd:failmessage>It must contain at least 6 caracters</fd:failmessage> </fd:length> </fd:validation> </fd:field> </fd:widgets> </fd:form> With this it works. If I remove the dummy widget won't. Probably I have a better work around for this, but I have lot of things to learn in the coocoon framework and I don't understand all the concepts completely. And probably it is something with my configuration (by the way I use Jetty). Isidro Isidro Vila Verde email:[EMAIL PROTECTED] web: http://serprest.pt/ tel: 223743701 tel: 969103006 -> -> Joerg -> -> --------------------------------------------------------------------- -> To unsubscribe, e-mail: [EMAIL PROTECTED] -> For additional commands, e-mail: [EMAIL PROTECTED] -> -> -> --- -> Incoming mail is certified Virus Free. -> Checked by AVG anti-virus system (http://www.grisoft.com). -> Version: 6.0.672 / Virus Database: 434 - Release Date: 28-04-2004 -> -> --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.672 / Virus Database: 434 - Release Date: 28-04-2004 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]