struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@gmail.com>
Subject Re: required if validation doesn'nt work
Date Fri, 15 Sep 2006 15:06:16 GMT
You have configured your validator using the format for the
"validwhen" validator - but specified the "requiredif" validator:

For the "requiredif" validator you need to use the following type of
configuration:
  http://struts.apache.org/1.2.x/userGuide/dev_validator.html#conditionals

For the "validwhen" validator:
  http://struts.apache.org/1.2.x/userGuide/dev_validator.html#validwhen

Niall

On 9/15/06, Heidy Gutiérrez Guzmán <heidyguti@gmail.com> wrote:
> The validation always fails, i don't have any kind of exeption.
>
> The key in the application resources is ok for that kind of message.
>
> This is the code that i put in the validatir.xml
>
>                 <form name="gestionarEdicionMonitoresEDHEPForm">
>                         <field property="nombre" depends="requiredif">
>                                 <arg0 key="etiqueta.Nombre" />
>                                 <var>
>                                         <var-name>test</var-name>
>                                         <var-value>(campoOculto != null)</var-value>
>                                 </var>
>
>                         </field>
> </form>
>
> On 9/15/06, Niall Pemberton <niall.pemberton@gmail.com> wrote:
> > On 9/15/06, Heidy Gutiérrez Guzmán <heidyguti@gmail.com> wrote:
> > > I'm using " requiredif " validation from Validator Framework, but does'nt
> > > work.
> > >
> > > I have de rule in the validator-rules.xml and the method
> > validateRequiredIf
> > > exists in org.apache.struts.validator.FieldChecks in the struts jar.
> > >
> > > I have read that requiredif is deprecated in struts 1.2, but that does'nt
> > > problem for me, because i'm using struts 1.1
> >
> > Just saying "it doesn't work" doesn't really give much information for
> > people to help you. Also its often useful to post the appropriate
> > "snippets" of your configuration files.
> >
> > Do you mean that validation always passes or fails or are you getting
> > some kind of exception? Have you checked the logs for any error
> > messages?
> >
> > Niall
> >
> > ---------------------------------------------------------------------
> > 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
>
>

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


Mime
View raw message