velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nbu...@gmail.com>
Subject Re: How do I error check my forms?
Date Wed, 20 Jul 2005 05:45:37 GMT
Also, VelocityTools has a ValidatorTool that should help you with this.  

On 7/19/05, Mikko Nylén <mikko.nylen@gmail.com> wrote:
> Paul Goepfert wrote:
> 
> > I created a web app using velocity and struts.  I have used the
> > velstruts package in my implementation.  I now want to add error
> > checking to my app.  I am not sure how to do it. Should I be doing the
> > error checking on the velocity or struts side of the implementation?
> >
> > -Paul
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >
> >
> I think you should do form validation in your ActionForm's validate()
> method, or use Validator framework (via Struts plugin).
> 
> At Velocity side you are limited to only display form validation errors
> and do client-side validation using JavaScript, which isn't quite
> effective taking in account that not everyone has JavaScript enabled.
> So, if you prefer to inform users about possible errors before sending
> forms, include also client-side validation using JavaScript, but do not
> forget the server-side validation. As far as I know, it's quite easy to
> add both client- and server-side validations with Validator framework.
> 
> - Mikko Nylén
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
>

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


Mime
View raw message