struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Addagalla" <suresh.addaga...@wipro.com>
Subject RE: Struts Validator
Date Tue, 17 Dec 2002 11:36:07 GMT
Hi Iris,

I came across the following excerpt from Struts kickstart:

"After moving all the properties out of the bean and into the DynaForm
definition in
struts-config.xml, the only thing left in the bean is the validate
function. By
using the Struts Validation framework, which ties into the Commons
Validator
package, you can remove this last piece of code and get rid of the form
bean."

Are we sure that we do need to define the form bean (which extends
ValidatorForm) if we use Struts Validator?

Thanks,
Suresh


>-----Original Message-----
>From: Iris [mailto:iris@enix.org] 
>Sent: Tuesday, December 17, 2002 3:12 PM
>To: Struts Users Mailing List
>Subject: Re: Struts Validator
>
>
>Suresh Addagalla wrote:
>
>>Hi,
>>
>>I'm new to Struts and am trying to get a hang of Struts Validator
>>framework.
>>
>>I defined the validator-rules.xml, application.properties,
>>validator.xml. To be able to do server-side validations, is it still
>>required to have the ActionForm class? If yes, do we need to override
>>the validate() or what exactly is needed?
>>
>Yes you need an ActionForm to describe your form (get and set).
>But you must no override the validate().
>And to use the validator, your ActionForm must extends ValidatorForm.
>
>Iris


Mime
View raw message