You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ch...@kattare.com on 2006/02/25 16:47:31 UTC

validator problems

Hi,
Sorry if you've seen this before – I sent it earlier but never saw it
come back.

I'm try to use the validator to check some details on a form (field
lengths for example).  When I run the form the validator doesn't seem to
run, though a call goes to it.  I end up with a stack trace in the logs like
org.apache.struts.validator.DynaValidatorForm validate
SEVERE:
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest)
org.apache.commons.validator.ValidatorException:
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest)
        at
org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction.java:627)

What am I doing wrong?


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


Re: validator problems

Posted by ch...@kattare.com.
Thanks for this – you're quite right.  That was exactly what I'd done!
chhum



Quoting Niall Pemberton <ni...@blueyonder.co.uk>:

> Looks like you have the wrong version of validator-rules.xml
> deployed. You
> don't say what version of struts you're using, but my guess is you're
> using
> Struts 1.2.7 or Struts 1.2.8 with a validator-rules.xml from an
> earlier
> version of Struts. Try deploying the validator-rules.xml that comes
> with the
> version of struts you're using.
> 
> When you change versions of struts - its worth checking out the
> upgrade
> notes on the wiki:
> 
> http://wiki.apache.org/struts/StrutsUpgradeNotes124to127
> http://wiki.apache.org/struts/StrutsUpgrade
> 
> Niall
> 
> ----- Original Message ----- 
> From: <ch...@kattare.com>
> Sent: Saturday, February 25, 2006 3:47 PM
> 
> 
> > Hi,
> > Sorry if you've seen this before - I sent it earlier but never saw
> it
> > come back.
> >
> > I'm try to use the validator to check some details on a form
> (field
> > lengths for example).  When I run the form the validator doesn't
> seem to
> > run, though a call goes to it.  I end up with a stack trace in the
> logs
> like
> > org.apache.struts.validator.DynaValidatorForm validate
> > SEVERE:
> >
> org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object,
> > org.apache.commons.validator.ValidatorAction,
> > org.apache.commons.validator.Field,
> > org.apache.struts.action.ActionMessages,
> > javax.servlet.http.HttpServletRequest)
> > org.apache.commons.validator.ValidatorException:
> >
> org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object,
> > org.apache.commons.validator.ValidatorAction,
> > org.apache.commons.validator.Field,
> > org.apache.struts.action.ActionMessages,
> > javax.servlet.http.HttpServletRequest)
> >         at
> >
>
org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorA
> ction.java:627)
> >
> > What am I doing wrong?
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Re: validator problems

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Looks like you have the wrong version of validator-rules.xml deployed. You
don't say what version of struts you're using, but my guess is you're using
Struts 1.2.7 or Struts 1.2.8 with a validator-rules.xml from an earlier
version of Struts. Try deploying the validator-rules.xml that comes with the
version of struts you're using.

When you change versions of struts - its worth checking out the upgrade
notes on the wiki:

http://wiki.apache.org/struts/StrutsUpgradeNotes124to127
http://wiki.apache.org/struts/StrutsUpgrade

Niall

----- Original Message ----- 
From: <ch...@kattare.com>
Sent: Saturday, February 25, 2006 3:47 PM


> Hi,
> Sorry if you've seen this before - I sent it earlier but never saw it
> come back.
>
> I'm try to use the validator to check some details on a form (field
> lengths for example).  When I run the form the validator doesn't seem to
> run, though a call goes to it.  I end up with a stack trace in the logs
like
> org.apache.struts.validator.DynaValidatorForm validate
> SEVERE:
> org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object,
> org.apache.commons.validator.ValidatorAction,
> org.apache.commons.validator.Field,
> org.apache.struts.action.ActionMessages,
> javax.servlet.http.HttpServletRequest)
> org.apache.commons.validator.ValidatorException:
> org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object,
> org.apache.commons.validator.ValidatorAction,
> org.apache.commons.validator.Field,
> org.apache.struts.action.ActionMessages,
> javax.servlet.http.HttpServletRequest)
>         at
>
org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorA
ction.java:627)
>
> What am I doing wrong?



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