You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Mike Tedesco <Mi...@skillsoft.com> on 2004/05/25 14:27:04 UTC

Validator Question

I was wondering about Pluggable Validators? I want to build into my app using the struts framework my own validator independent of Forms and HTTP (i.e. my own class that can be called from the business layer and all I have to do is supply a bean I want validation to be performed on.

Is this possible from any layer (when will method get called)  and do you know of the steps I need to do this and how it explicitly gets called and how does it know about the params like Field, ValidationAction , etc.?

 

-- Thanks


Re: Validator Question

Posted by David Graham <gr...@yahoo.com>.
--- Mike Tedesco <Mi...@skillsoft.com> wrote:
> I was wondering about Pluggable Validators? I want to build into my app
> using the struts framework my own validator independent of Forms and
> HTTP (i.e. my own class that can be called from the business layer and
> all I have to do is supply a bean I want validation to be performed on.
> 
> Is this possible from any layer (when will method get called)  and do
> you know of the steps I need to do this and how it explicitly gets
> called and how does it know about the params like Field,
> ValidationAction , etc.?

Commons Validator can be used in any layer of your app but you need to
invoke it yourself if you're not running it under Struts.  There's an
example class in cvs that demonstrates how to use the validator in a
non-web standalone application.  That's probably a good place to start.  

You could also look at the Struts classes in the
org.apache.struts.validator package to see how it configures and invokes
Commons Validator.

David


> 
>  
> 
> -- Thanks
> 
> 



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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