struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakub Milkiewicz" <jmilkiew...@gmail.com>
Subject Re: validatewhen --- what's wrong?
Date Thu, 27 Apr 2006 18:59:16 GMT
Right
This anlr gramma is quite not intuitive ...

2006/4/27, Chaudhary, Harsh <HCHAUDHA@amfam.com>:
>
> Try it like this.
> <var-value>(*this* == 'password')</var-value>
>
> -----Original Message-----
> From: Jakub Milkiewicz [mailto:jmilkiewicz@gmail.com]
> Sent: Thursday, April 27, 2006 12:34 PM
> To: Struts Users Mailing List
> Subject: Re: validatewhen --- what's wrong?
>
>
> Hi
> To tell you the truth i do not understand what you wanna do...
> Anyway your validwhen condition is always true!
> Note that you are comparing *this* - for property password,  with
> property
> password.
> It means something like 1==1.
>
>
>
> 2006/4/26, Zheng Wen Zhe <zwenzhe@espatial.com>:
> >
> > Hey all,
> >
> > I wanna it say yes when a user type 'password' into this password
> field.
> >
> > But, it doesn't work that way. Validation always passes no matter what
> the
> > user has given into the password field.
> >
> > Pls, someone tell what wrong with it!!!
> >
> >
> >
> > Validation.xml
> >
> > ****************
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <!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="loginForm">
> >
> >                   <field property="login" depends="required">
> >
> >                         <arg0 key="prompt.login" />
> >
> >                   </field>
> >
> >                   <field property="password"
> depends="required,validwhen">
> >
> >                         <arg0 key="prompt.password" />
> >
> >                         <var>
> >
> >                               <var-name>test</var-name>
> >
> >                               <var-value>*this* ==
> password</var-value>
> >
> >                 </var>
> >
> >
> >
> >                   </field>
> >
> >             </form>
> >
> >       </formset>
> >
> >
> >
> > </form-validation>
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message