Hello,

I try to use the validator with validwhen. I want to use a string comparison but it fails. I use struts 1.2.7 and here is my validators.xml:

<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
         "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>
<form-validation>
<formset> <form name="finSaisie">
             <field property="financement" depends="validwhen">
                 <arg0 key="gwiad.libelle.financement"/>
               <var>
                     <var-name>test</var-name>
                     <var-value>(statut=="Doctorant")</var-value>
               </var>
</field> </form> </formset> </form-validation>

I gess it means that the field 'financement' is valid when the field 'statut' is "Doctorant". But it is never valid... I tested with success integer comparison and the null comparison but I can't use string comparison. But the struts documentation tells it is possible and some users in this mailing list use string comparison with success.

So what can I do?

Thanx,

Manu.

--
Emmanuel Leguy                  LIFL - UMR8022 CNRS - Bat M3
Tel: +33 3 28 77 85 32          USTL - Universite de Lille 1
Fax: +33 3 28 77 85 37          59655 VILLENEUVE D'ASCQ CEDEX - FRANCE

mailto:[EMAIL PROTECTED]        
http://www.lifl.fr/ANNUAIRE/employee.php?login=leguye

Ce mail est signe par un certificat X509 fourni par le CNRS
La verification de ce certificat peut etre faite a l'adresse suivante: http://igc.services.cnrs.fr/CNRS-Standard/recherche.html

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to