<!-- Field Validator Syntax --> <field name="myField"> <field-validator type="fieldexpression"> <param name="expression"><![CDATA[#password = #confirmPassword]]></param> <message>la parola d'accesso dovrebbe essere uguale al confirmPassword </message> </field-validator> </field> for field-validation
we would need to see the interceptor stack you're using, and the action configuration as earlier suggested for a complete diagnosis Martin Gainty ______________________________________________ Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Fri, 15 May 2009 06:03:40 -0500 > Subject: Re: xml validation > From: stanl...@gmail.com > To: user@struts.apache.org > > I use this successfully. > > <field name="credential.password"> > <field-validator type="expression"> > <param name="expression"> > > credential.passwordRepeat.toUpperCase().equals(credential.password.toUpperCase()) > </param> > <message key="passwordsNotMatching" /> > </field-validator> > </field> > > On Thu, May 14, 2009 at 2:11 PM, Dave Newton <newton.d...@yahoo.com> wrote: > > > manub wrote: > > > >> - I'm not able to perform an equality check on two parameters. I've got > >> password and confirmPassword which I try to validate using something like: > >> > >> <validator type="expression"> > >> confirmPassword.equals(password) > >> <message>...</message> > >> </validator> > >> > >> What am I getting wrong? > >> - Even if I'm putting input that should be validated, I'm never going to > >> the > >> execute method of the action. It seems that validation always fails. > >> > >> > >> DEBUG [http-8080-1] (CommonsLogger.java:57) - Bypassing > >> //EseguiRegistrazione > >> DEBUG [http-8080-1] (CommonsLogger.java:57) - Validating > >> //EseguiRegistrazione with method execute. > >> DEBUG [http-8080-1] (CommonsLogger.java:57) - Forwarding to location > >> /pages/account/registrazione.jsp > >> > >> (EseguiRegistrazione is the action I forward my submit to, the one that is > >> validated, and the location is the one associated to input result) > >> > >> Using Struts 2.1.6. > >> > > > > Include the complete field validation configuration, the interceptor stack > > you're using, and the action configuration. > > > > Dave > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > _________________________________________________________________ Hotmail® goes with you. http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009