You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mr Alireza Fattahi <af...@yahoo.com> on 2002/11/03 08:39:17 UTC

Manually call strust validation

Hi,
I am using validitor feature. I have turn the
validation OFF on struts_config.xml. How can I
manually do the validation on my action class by
calling validitor objects. 

Thanks.
P.S: I want validate my form, not before the action is
executed but after I have done some logics.

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Manually call strust validation

Posted by Mr Alireza Fattahi <af...@yahoo.com>.
I got the answer!

Here is code

DynaActionForm dy = (DynaActionForm) form;
ActionErrors err  = new ActionErrors();
err = dy.validate(mapping,request)

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Manually call strust validation

Posted by Mr Alireza Fattahi <af...@yahoo.com>.
Thanks, but i get Nullpointer exception, Can you
please help me with more details.

This is my code:
ValidatorActionForm vl = new ValidatorActionForm();
ActionErrors err = new ActionErrors();
err  = vl.validate ( mapping, request );

Is above correct should my action calss extend
ValidatorActionForm?


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Manually call strust validation

Posted by "V. Cekvenich" <vi...@users.sourceforge.net>.
validate()

Mr Alireza Fattahi wrote:
> Hi,
> I am using validitor feature. I have turn the
> validation OFF on struts_config.xml. How can I
> manually do the validation on my action class by
> calling validitor objects. 
> 
> Thanks.
> P.S: I want validate my form, not before the action is
> executed but after I have done some logics.
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>