You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by natalia_ <ns...@cidc.com> on 2008/08/15 21:19:42 UTC

validation: fieldexpression doesn't get executed if stringlength validation fails

I want all validation on 2 fields to take place, I am not short-circuiting
any. But it looks like the behavior is such that if stringlength fails the
fieldexpression doesn't fire. Only if the field satisfies the length
requirement then I see the result of fieldexpression to appear. I tried to
put the fieldexpression before the stringlength, but that didn't change
anything. 

<field name="account.loginName">
        <field-validator type="stringlength">
          3
          8
          <message key="validation.loginName.length">Login Name must be
between ${minLength} and ${maxLength} characters in length</message>
      </field-validator>

        <field-validator type="fieldexpression">
            
            	account.loginName.equals(confirmLoginName)
            
            <message key="validation.loginName.doNotMatch">Login Name and
Confirm Login Name do not match</message>
        </field-validator>   
            
  </field>

<field name="confirmLoginName">
        <field-validator type="stringlength">
          3
          8
          <message key="validation.confirmLoginName.length">Confirm Login
Name must be between ${minLength} and ${maxLength} characters in
length</message>
      </field-validator>
</field>
-- 
View this message in context: http://www.nabble.com/validation%3A-fieldexpression-doesn%27t-get-executed-if-stringlength-validation-fails-tp19004155p19004155.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: validation: fieldexpression doesn't get executed if stringlength validation fails

Posted by Martin Gainty <mg...@hotmail.com>.
it must be true..i took a business course and according to the book..there are people who are paid for work..(..not here unfortunately..)

Martin
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> Date: Fri, 15 Aug 2008 18:45:06 -0700
> From: newton.dave@yahoo.com
> Subject: RE: validation: fieldexpression doesn't get executed if stringlength validation fails
> To: user@struts.apache.org
> 
> Wait... you guys get PAID to work?!?!
> 
> 
> --- On Fri, 8/15/08, Martin Gainty <mg...@hotmail.com> wrote:
> 
> > From: Martin Gainty <mg...@hotmail.com>
> > Subject: RE: validation: fieldexpression doesn't get executed if stringlength validation fails
> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > Date: Friday, August 15, 2008, 9:27 PM
> > yep..i need a secretary...know anyone that wants to work for
> > free?
> > Thanks,
> > Martin 
> > ______________________________________________ 
> > Disclaimer and confidentiality note 
> > Everything in this e-mail and any attachments relates to
> > the official business of Sender. This transmission is of a
> > confidential nature and Sender does not endorse distribution
> > to any party other than intended recipient. Sender does not
> > necessarily endorse content contained within this
> > transmission. 
> > 
> > 
> > > Date: Fri, 15 Aug 2008 17:32:53 -0700
> > > From: newton.dave@yahoo.com
> > > Subject: RE: validation: fieldexpression doesn't
> > get executed if stringlength validation fails
> > > To: user@struts.apache.org
> > > 
> > > I think you might have replied to the wrong message?
> > > 
> > > Dave
> > > 
> > > --- On Fri, 8/15/08, Martin Gainty wrote:
> > > > 2 solutions
> > > > 1)cookies
> > > > 2a)store old windows value
> > > > session.put("windowId",1);
> > > > 2b)open next window in new window 
> > > > 2c)windows.open('_blank')
> > > >
> > 2d)onload="session.put("windowid",2);
> > > > test windowid
> > > > 
> > > > anyone?
> > > > Martin 
> > > > ______________________________________________ 
> > > > Disclaimer and confidentiality note 
> > > > Everything in this e-mail and any attachments
> > relates to
> > > > the official business of Sender. This
> > transmission is of a
> > > > confidential nature and Sender does not endorse
> > distribution
> > > > to any party other than intended recipient.
> > Sender does not
> > > > necessarily endorse content contained within this
> > > > transmission. 
> > > > 
> > > > 
> > > > > Date: Fri, 15 Aug 2008 18:13:43 -0300
> > > > > From: belingueres@gmail.com
> > > > > To: user@struts.apache.org
> > > > > Subject: Re: validation: fieldexpression
> > doesn't
> > > > get executed if stringlength validation fails
> > > > > 
> > > > > Besides the 3-8 thing there (which I suppose
> > is a
> > > > typo), String
> > > > > comparison with == works well for me:
> > > > > 
> > > > >     <field-validator
> > > > type="fieldexpression">
> > > > >       <param
> > > >
> > name="expression"><![CDATA[newPassword ==
> > > > > verifNewPassword]]></param>
> > > > >       <message>Password must be the
> > > > same</message>
> > > > >     </field-validator>
> > > > > 
> > > > > 
> > > > > 2008/8/15, natalia_
> > <ns...@cidc.com>:
> > > > > >
> > > > > > I want all validation on 2 fields to
> > take place,
> > > > I am not short-circuiting
> > > > > > any. But it looks like the behavior is
> > such that
> > > > if stringlength fails the
> > > > > > fieldexpression doesn't fire. Only
> > if the
> > > > field satisfies the length
> > > > > > requirement then I see the result of
> > > > fieldexpression to appear. I tried to
> > > > > > put the fieldexpression before the
> > stringlength,
> > > > but that didn't change
> > > > > > anything.
> > > > > >
> > > > > > <field
> > name="account.loginName">
> > > > > >        <field-validator
> > > > type="stringlength">
> > > > > >          3
> > > > > >          8
> > > > > >          <message
> > > >
> > key="validation.loginName.length">Login Name
> > > > must be
> > > > > > between ${minLength} and ${maxLength}
> > characters
> > > > in length</message>
> > > > > >      </field-validator>
> > > > > >
> > > > > >        <field-validator
> > > > type="fieldexpression">
> > > > > >
> > > > > >               
> > > > account.loginName.equals(confirmLoginName)
> > > > > >
> > > > > >            <message
> > > >
> > key="validation.loginName.doNotMatch">Login
> > > > Name and
> > > > > > Confirm Login Name do not
> > match</message>
> > > > > >        </field-validator>
> > > > > >
> > > > > >  </field>
> > > > > >
> > > > > > <field
> > name="confirmLoginName">
> > > > > >        <field-validator
> > > > type="stringlength">
> > > > > >          3
> > > > > >          8
> > > > > >          <message
> > > >
> > key="validation.confirmLoginName.length">Confirm
> > > > Login
> > > > > > Name must be between ${minLength} and
> > > > ${maxLength} characters in
> > > > > > length</message>
> > > > > >      </field-validator>
> > > > > > </field>
> > > > > > --
> > > > > > View this message in context:
> > > >
> > http://www.nabble.com/validation%3A-fieldexpression-doesn%27t-get-executed-if-stringlength-validation-fails-tp19004155p19004155.html
> > > > > > Sent from the Struts - User mailing
> > list archive
> > > > at Nabble.com.
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> > > > user-unsubscribe@struts.apache.org
> > > > > > For additional commands, e-mail:
> > > > user-help@struts.apache.org
> > > > > >
> > > > > >
> > > > > 
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > user-unsubscribe@struts.apache.org
> > > > > For additional commands, e-mail:
> > > > user-help@struts.apache.org
> > > > > 
> > > > 
> > > >
> > _________________________________________________________________
> > > > Get ideas on sharing photos from people like you.
> >  Find new
> > > > ways to share.
> > > >
> > http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008
> > > 
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > user-help@struts.apache.org
> > > 
> > 
> > _________________________________________________________________
> > Be the filmmaker you always wanted to be—learn how to
> > burn a DVD with Windows®.
> > http://clk.atdmt.com/MRT/go/108588797/direct/01/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Get ideas on sharing photos from people like you.  Find new ways to share.
http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008

RE: validation: fieldexpression doesn't get executed if stringlength validation fails

Posted by Dave Newton <ne...@yahoo.com>.
Wait... you guys get PAID to work?!?!


--- On Fri, 8/15/08, Martin Gainty <mg...@hotmail.com> wrote:

> From: Martin Gainty <mg...@hotmail.com>
> Subject: RE: validation: fieldexpression doesn't get executed if stringlength validation fails
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Date: Friday, August 15, 2008, 9:27 PM
> yep..i need a secretary...know anyone that wants to work for
> free?
> Thanks,
> Martin 
> ______________________________________________ 
> Disclaimer and confidentiality note 
> Everything in this e-mail and any attachments relates to
> the official business of Sender. This transmission is of a
> confidential nature and Sender does not endorse distribution
> to any party other than intended recipient. Sender does not
> necessarily endorse content contained within this
> transmission. 
> 
> 
> > Date: Fri, 15 Aug 2008 17:32:53 -0700
> > From: newton.dave@yahoo.com
> > Subject: RE: validation: fieldexpression doesn't
> get executed if stringlength validation fails
> > To: user@struts.apache.org
> > 
> > I think you might have replied to the wrong message?
> > 
> > Dave
> > 
> > --- On Fri, 8/15/08, Martin Gainty wrote:
> > > 2 solutions
> > > 1)cookies
> > > 2a)store old windows value
> > > session.put("windowId",1);
> > > 2b)open next window in new window 
> > > 2c)windows.open('_blank')
> > >
> 2d)onload="session.put("windowid",2);
> > > test windowid
> > > 
> > > anyone?
> > > Martin 
> > > ______________________________________________ 
> > > Disclaimer and confidentiality note 
> > > Everything in this e-mail and any attachments
> relates to
> > > the official business of Sender. This
> transmission is of a
> > > confidential nature and Sender does not endorse
> distribution
> > > to any party other than intended recipient.
> Sender does not
> > > necessarily endorse content contained within this
> > > transmission. 
> > > 
> > > 
> > > > Date: Fri, 15 Aug 2008 18:13:43 -0300
> > > > From: belingueres@gmail.com
> > > > To: user@struts.apache.org
> > > > Subject: Re: validation: fieldexpression
> doesn't
> > > get executed if stringlength validation fails
> > > > 
> > > > Besides the 3-8 thing there (which I suppose
> is a
> > > typo), String
> > > > comparison with == works well for me:
> > > > 
> > > >     <field-validator
> > > type="fieldexpression">
> > > >       <param
> > >
> name="expression"><![CDATA[newPassword ==
> > > > verifNewPassword]]></param>
> > > >       <message>Password must be the
> > > same</message>
> > > >     </field-validator>
> > > > 
> > > > 
> > > > 2008/8/15, natalia_
> <ns...@cidc.com>:
> > > > >
> > > > > I want all validation on 2 fields to
> take place,
> > > I am not short-circuiting
> > > > > any. But it looks like the behavior is
> such that
> > > if stringlength fails the
> > > > > fieldexpression doesn't fire. Only
> if the
> > > field satisfies the length
> > > > > requirement then I see the result of
> > > fieldexpression to appear. I tried to
> > > > > put the fieldexpression before the
> stringlength,
> > > but that didn't change
> > > > > anything.
> > > > >
> > > > > <field
> name="account.loginName">
> > > > >        <field-validator
> > > type="stringlength">
> > > > >          3
> > > > >          8
> > > > >          <message
> > >
> key="validation.loginName.length">Login Name
> > > must be
> > > > > between ${minLength} and ${maxLength}
> characters
> > > in length</message>
> > > > >      </field-validator>
> > > > >
> > > > >        <field-validator
> > > type="fieldexpression">
> > > > >
> > > > >               
> > > account.loginName.equals(confirmLoginName)
> > > > >
> > > > >            <message
> > >
> key="validation.loginName.doNotMatch">Login
> > > Name and
> > > > > Confirm Login Name do not
> match</message>
> > > > >        </field-validator>
> > > > >
> > > > >  </field>
> > > > >
> > > > > <field
> name="confirmLoginName">
> > > > >        <field-validator
> > > type="stringlength">
> > > > >          3
> > > > >          8
> > > > >          <message
> > >
> key="validation.confirmLoginName.length">Confirm
> > > Login
> > > > > Name must be between ${minLength} and
> > > ${maxLength} characters in
> > > > > length</message>
> > > > >      </field-validator>
> > > > > </field>
> > > > > --
> > > > > View this message in context:
> > >
> http://www.nabble.com/validation%3A-fieldexpression-doesn%27t-get-executed-if-stringlength-validation-fails-tp19004155p19004155.html
> > > > > Sent from the Struts - User mailing
> list archive
> > > at Nabble.com.
> > > > >
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > user-unsubscribe@struts.apache.org
> > > > > For additional commands, e-mail:
> > > user-help@struts.apache.org
> > > > >
> > > > >
> > > > 
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail:
> > > user-help@struts.apache.org
> > > > 
> > > 
> > >
> _________________________________________________________________
> > > Get ideas on sharing photos from people like you.
>  Find new
> > > ways to share.
> > >
> http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> > 
> 
> _________________________________________________________________
> Be the filmmaker you always wanted to be—learn how to
> burn a DVD with Windows®.
> http://clk.atdmt.com/MRT/go/108588797/direct/01/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: validation: fieldexpression doesn't get executed if stringlength validation fails

Posted by Martin Gainty <mg...@hotmail.com>.
yep..i need a secretary...know anyone that wants to work for free?
Thanks,
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> Date: Fri, 15 Aug 2008 17:32:53 -0700
> From: newton.dave@yahoo.com
> Subject: RE: validation: fieldexpression doesn't get executed if stringlength validation fails
> To: user@struts.apache.org
> 
> I think you might have replied to the wrong message?
> 
> Dave
> 
> --- On Fri, 8/15/08, Martin Gainty wrote:
> > 2 solutions
> > 1)cookies
> > 2a)store old windows value
> > session.put("windowId",1);
> > 2b)open next window in new window 
> > 2c)windows.open('_blank')
> > 2d)onload="session.put("windowid",2);
> > test windowid
> > 
> > anyone?
> > Martin 
> > ______________________________________________ 
> > Disclaimer and confidentiality note 
> > Everything in this e-mail and any attachments relates to
> > the official business of Sender. This transmission is of a
> > confidential nature and Sender does not endorse distribution
> > to any party other than intended recipient. Sender does not
> > necessarily endorse content contained within this
> > transmission. 
> > 
> > 
> > > Date: Fri, 15 Aug 2008 18:13:43 -0300
> > > From: belingueres@gmail.com
> > > To: user@struts.apache.org
> > > Subject: Re: validation: fieldexpression doesn't
> > get executed if stringlength validation fails
> > > 
> > > Besides the 3-8 thing there (which I suppose is a
> > typo), String
> > > comparison with == works well for me:
> > > 
> > >     <field-validator
> > type="fieldexpression">
> > >       <param
> > name="expression"><![CDATA[newPassword ==
> > > verifNewPassword]]></param>
> > >       <message>Password must be the
> > same</message>
> > >     </field-validator>
> > > 
> > > 
> > > 2008/8/15, natalia_ <ns...@cidc.com>:
> > > >
> > > > I want all validation on 2 fields to take place,
> > I am not short-circuiting
> > > > any. But it looks like the behavior is such that
> > if stringlength fails the
> > > > fieldexpression doesn't fire. Only if the
> > field satisfies the length
> > > > requirement then I see the result of
> > fieldexpression to appear. I tried to
> > > > put the fieldexpression before the stringlength,
> > but that didn't change
> > > > anything.
> > > >
> > > > <field name="account.loginName">
> > > >        <field-validator
> > type="stringlength">
> > > >          3
> > > >          8
> > > >          <message
> > key="validation.loginName.length">Login Name
> > must be
> > > > between ${minLength} and ${maxLength} characters
> > in length</message>
> > > >      </field-validator>
> > > >
> > > >        <field-validator
> > type="fieldexpression">
> > > >
> > > >               
> > account.loginName.equals(confirmLoginName)
> > > >
> > > >            <message
> > key="validation.loginName.doNotMatch">Login
> > Name and
> > > > Confirm Login Name do not match</message>
> > > >        </field-validator>
> > > >
> > > >  </field>
> > > >
> > > > <field name="confirmLoginName">
> > > >        <field-validator
> > type="stringlength">
> > > >          3
> > > >          8
> > > >          <message
> > key="validation.confirmLoginName.length">Confirm
> > Login
> > > > Name must be between ${minLength} and
> > ${maxLength} characters in
> > > > length</message>
> > > >      </field-validator>
> > > > </field>
> > > > --
> > > > View this message in context:
> > http://www.nabble.com/validation%3A-fieldexpression-doesn%27t-get-executed-if-stringlength-validation-fails-tp19004155p19004155.html
> > > > Sent from the Struts - User mailing list archive
> > at Nabble.com.
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail:
> > user-help@struts.apache.org
> > > >
> > > >
> > > 
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > user-help@struts.apache.org
> > > 
> > 
> > _________________________________________________________________
> > Get ideas on sharing photos from people like you.  Find new
> > ways to share.
> > http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Be the filmmaker you always wanted to be—learn how to burn a DVD with Windows®.
http://clk.atdmt.com/MRT/go/108588797/direct/01/

RE: validation: fieldexpression doesn't get executed if stringlength validation fails

Posted by Dave Newton <ne...@yahoo.com>.
I think you might have replied to the wrong message?

Dave

--- On Fri, 8/15/08, Martin Gainty wrote:
> 2 solutions
> 1)cookies
> 2a)store old windows value
> session.put("windowId",1);
> 2b)open next window in new window 
> 2c)windows.open('_blank')
> 2d)onload="session.put("windowid",2);
> test windowid
> 
> anyone?
> Martin 
> ______________________________________________ 
> Disclaimer and confidentiality note 
> Everything in this e-mail and any attachments relates to
> the official business of Sender. This transmission is of a
> confidential nature and Sender does not endorse distribution
> to any party other than intended recipient. Sender does not
> necessarily endorse content contained within this
> transmission. 
> 
> 
> > Date: Fri, 15 Aug 2008 18:13:43 -0300
> > From: belingueres@gmail.com
> > To: user@struts.apache.org
> > Subject: Re: validation: fieldexpression doesn't
> get executed if stringlength validation fails
> > 
> > Besides the 3-8 thing there (which I suppose is a
> typo), String
> > comparison with == works well for me:
> > 
> >     <field-validator
> type="fieldexpression">
> >       <param
> name="expression"><![CDATA[newPassword ==
> > verifNewPassword]]></param>
> >       <message>Password must be the
> same</message>
> >     </field-validator>
> > 
> > 
> > 2008/8/15, natalia_ <ns...@cidc.com>:
> > >
> > > I want all validation on 2 fields to take place,
> I am not short-circuiting
> > > any. But it looks like the behavior is such that
> if stringlength fails the
> > > fieldexpression doesn't fire. Only if the
> field satisfies the length
> > > requirement then I see the result of
> fieldexpression to appear. I tried to
> > > put the fieldexpression before the stringlength,
> but that didn't change
> > > anything.
> > >
> > > <field name="account.loginName">
> > >        <field-validator
> type="stringlength">
> > >          3
> > >          8
> > >          <message
> key="validation.loginName.length">Login Name
> must be
> > > between ${minLength} and ${maxLength} characters
> in length</message>
> > >      </field-validator>
> > >
> > >        <field-validator
> type="fieldexpression">
> > >
> > >               
> account.loginName.equals(confirmLoginName)
> > >
> > >            <message
> key="validation.loginName.doNotMatch">Login
> Name and
> > > Confirm Login Name do not match</message>
> > >        </field-validator>
> > >
> > >  </field>
> > >
> > > <field name="confirmLoginName">
> > >        <field-validator
> type="stringlength">
> > >          3
> > >          8
> > >          <message
> key="validation.confirmLoginName.length">Confirm
> Login
> > > Name must be between ${minLength} and
> ${maxLength} characters in
> > > length</message>
> > >      </field-validator>
> > > </field>
> > > --
> > > View this message in context:
> http://www.nabble.com/validation%3A-fieldexpression-doesn%27t-get-executed-if-stringlength-validation-fails-tp19004155p19004155.html
> > > Sent from the Struts - User mailing list archive
> at Nabble.com.
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> user-help@struts.apache.org
> > >
> > >
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> > 
> 
> _________________________________________________________________
> Get ideas on sharing photos from people like you.  Find new
> ways to share.
> http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: validation: fieldexpression doesn't get executed if stringlength validation fails

Posted by Martin Gainty <mg...@hotmail.com>.
2 solutions
1)cookies
2a)store old windows value session.put("windowId",1);
2b)open next window in new window 
2c)windows.open('_blank')
2d)onload="session.put("windowid",2);
test windowid

anyone?
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> Date: Fri, 15 Aug 2008 18:13:43 -0300
> From: belingueres@gmail.com
> To: user@struts.apache.org
> Subject: Re: validation: fieldexpression doesn't get executed if stringlength validation fails
> 
> Besides the 3-8 thing there (which I suppose is a typo), String
> comparison with == works well for me:
> 
>     <field-validator type="fieldexpression">
>       <param name="expression"><![CDATA[newPassword ==
> verifNewPassword]]></param>
>       <message>Password must be the same</message>
>     </field-validator>
> 
> 
> 2008/8/15, natalia_ <ns...@cidc.com>:
> >
> > I want all validation on 2 fields to take place, I am not short-circuiting
> > any. But it looks like the behavior is such that if stringlength fails the
> > fieldexpression doesn't fire. Only if the field satisfies the length
> > requirement then I see the result of fieldexpression to appear. I tried to
> > put the fieldexpression before the stringlength, but that didn't change
> > anything.
> >
> > <field name="account.loginName">
> >        <field-validator type="stringlength">
> >          3
> >          8
> >          <message key="validation.loginName.length">Login Name must be
> > between ${minLength} and ${maxLength} characters in length</message>
> >      </field-validator>
> >
> >        <field-validator type="fieldexpression">
> >
> >                account.loginName.equals(confirmLoginName)
> >
> >            <message key="validation.loginName.doNotMatch">Login Name and
> > Confirm Login Name do not match</message>
> >        </field-validator>
> >
> >  </field>
> >
> > <field name="confirmLoginName">
> >        <field-validator type="stringlength">
> >          3
> >          8
> >          <message key="validation.confirmLoginName.length">Confirm Login
> > Name must be between ${minLength} and ${maxLength} characters in
> > length</message>
> >      </field-validator>
> > </field>
> > --
> > View this message in context: http://www.nabble.com/validation%3A-fieldexpression-doesn%27t-get-executed-if-stringlength-validation-fails-tp19004155p19004155.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Get ideas on sharing photos from people like you.  Find new ways to share.
http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008

Re: validation: fieldexpression doesn't get executed if stringlength validation fails

Posted by Gabriel Belingueres <be...@gmail.com>.
Besides the 3-8 thing there (which I suppose is a typo), String
comparison with == works well for me:

    <field-validator type="fieldexpression">
      <param name="expression"><![CDATA[newPassword ==
verifNewPassword]]></param>
      <message>Password must be the same</message>
    </field-validator>


2008/8/15, natalia_ <ns...@cidc.com>:
>
> I want all validation on 2 fields to take place, I am not short-circuiting
> any. But it looks like the behavior is such that if stringlength fails the
> fieldexpression doesn't fire. Only if the field satisfies the length
> requirement then I see the result of fieldexpression to appear. I tried to
> put the fieldexpression before the stringlength, but that didn't change
> anything.
>
> <field name="account.loginName">
>        <field-validator type="stringlength">
>          3
>          8
>          <message key="validation.loginName.length">Login Name must be
> between ${minLength} and ${maxLength} characters in length</message>
>      </field-validator>
>
>        <field-validator type="fieldexpression">
>
>                account.loginName.equals(confirmLoginName)
>
>            <message key="validation.loginName.doNotMatch">Login Name and
> Confirm Login Name do not match</message>
>        </field-validator>
>
>  </field>
>
> <field name="confirmLoginName">
>        <field-validator type="stringlength">
>          3
>          8
>          <message key="validation.confirmLoginName.length">Confirm Login
> Name must be between ${minLength} and ${maxLength} characters in
> length</message>
>      </field-validator>
> </field>
> --
> View this message in context: http://www.nabble.com/validation%3A-fieldexpression-doesn%27t-get-executed-if-stringlength-validation-fails-tp19004155p19004155.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org